From 869595ae526ddacb207f89c2693dc89ab378075f Mon Sep 17 00:00:00 2001 From: Mridang Agarwalla Date: Wed, 4 Jun 2025 11:49:01 +0300 Subject: [PATCH 1/3] chore: update generated output under .openapi markers --- zitadel_client/api/__init__.py | 10 +- ...vice_api.py => beta_action_service_api.py} | 1170 +- .../api/beta_feature_service_api.py | 3309 ++++++ zitadel_client/api/beta_oidc_service_api.py | 825 ++ .../api/beta_organization_service_api.py | 555 + .../api/beta_session_service_api.py | 1659 +++ .../api/beta_settings_service_api.py | 3070 ++++++ zitadel_client/api/beta_user_service_api.py | 9663 +++++++++++++++++ ...ice_api.py => beta_web_key_service_api.py} | 594 +- zitadel_client/api/feature_service_api.py | 838 +- .../api/identity_provider_service_api.py | 323 +- zitadel_client/api/oidc_service_api.py | 496 +- .../api/organization_service_api.py | 315 +- zitadel_client/api/saml_service_api.py | 367 +- zitadel_client/api/session_service_api.py | 523 +- zitadel_client/api/settings_service_api.py | 1039 +- zitadel_client/api/user_service_api.py | 3058 +++--- zitadel_client/models/__init__.py | 642 +- .../models/action_service_beta_condition.py | 96 - .../action_service_beta_event_execution.py | 91 - .../models/action_service_beta_target.py | 107 - .../action_service_create_target_request.py | 99 - .../action_service_update_target_request.py | 101 - zitadel_client/models/all.py | 86 + zitadel_client/models/all1.py | 86 + ...elete_web_key_response.py => and_query.py} | 21 +- zitadel_client/models/and_query1.py | 92 + zitadel_client/models/apple.py | 90 + ...dc_service_protobuf_any.py => auth_url.py} | 14 +- zitadel_client/models/azure_ad.py | 90 + .../models/beta_action_service_any.py | 90 + .../models/beta_action_service_condition.py | 165 + .../beta_action_service_connect_error.py | 104 + ...ta_action_service_create_target_request.py | 151 + ...a_action_service_create_target_response.py | 91 + ...ta_action_service_delete_target_request.py | 86 + ...a_action_service_delete_target_response.py | 87 + .../beta_action_service_event_execution.py | 151 + .../models/beta_action_service_execution.py | 97 + ...eta_action_service_execution_field_name.py | 39 + ..._action_service_execution_search_filter.py | 151 + .../beta_action_service_execution_type.py | 40 + ...a_action_service_execution_type_filter.py} | 16 +- ...beta_action_service_function_execution.py} | 10 +- .../beta_action_service_get_target_request.py | 86 + ...eta_action_service_get_target_response.py} | 16 +- ...ta_action_service_in_conditions_filter.py} | 32 +- ...ta_action_service_in_target_ids_filter.py} | 10 +- ...vice_list_execution_functions_response.py} | 12 +- ...ervice_list_execution_methods_response.py} | 12 +- ...rvice_list_execution_services_response.py} | 12 +- ..._action_service_list_executions_request.py | 103 + ...ction_service_list_executions_response.py} | 20 +- ...ta_action_service_list_targets_request.py} | 26 +- ...a_action_service_list_targets_response.py} | 20 +- ...beta_action_service_pagination_request.py} | 23 +- ...eta_action_service_pagination_response.py} | 30 +- .../beta_action_service_request_execution.py | 151 + .../beta_action_service_response_execution.py | 151 + ...ll.py => beta_action_service_rest_call.py} | 10 +- ...py => beta_action_service_rest_webhook.py} | 10 +- ...a_action_service_set_execution_request.py} | 14 +- ...a_action_service_set_execution_response.py | 87 + .../models/beta_action_service_target.py | 151 + ... beta_action_service_target_field_name.py} | 6 +- .../beta_action_service_target_filter.py | 86 + .../beta_action_service_target_name_filter.py | 89 + ...eta_action_service_target_search_filter.py | 137 + ...beta_action_service_text_filter_method.py} | 6 +- ...ta_action_service_update_target_request.py | 151 + ...a_action_service_update_target_response.py | 94 + .../models/beta_feature_service_any.py | 90 + .../beta_feature_service_connect_error.py | 104 + .../models/beta_feature_service_details.py | 98 + .../beta_feature_service_feature_flag.py | 89 + ...e_service_get_instance_features_request.py | 86 + ..._service_get_instance_features_response.py | 137 + ...rvice_get_organization_features_request.py | 88 + ...vice_get_organization_features_response.py | 90 + ...re_service_get_system_features_response.py | 127 + ...ature_service_get_user_features_request.py | 88 + ...ture_service_get_user_features_response.py | 90 + ...ta_feature_service_improved_performance.py | 41 + ...vice_improved_performance_feature_flag.py} | 16 +- ...ervice_reset_instance_features_response.py | 90 + ...ice_reset_organization_features_request.py | 86 + ...ce_reset_organization_features_response.py | 90 + ..._service_reset_system_features_response.py | 90 + ...ure_service_reset_user_features_request.py | 86 + ...re_service_reset_user_features_response.py | 90 + ...e_service_set_instance_features_request.py | 143 + ..._service_set_instance_features_response.py | 90 + ...rvice_set_organization_features_request.py | 86 + ...vice_set_organization_features_response.py | 90 + ...ure_service_set_system_features_request.py | 129 + ...re_service_set_system_features_response.py | 90 + ...eature_service_set_user_feature_request.py | 86 + ...ture_service_set_user_features_response.py | 90 + .../models/beta_feature_service_source.py | 42 + .../models/beta_oidc_service_any.py | 90 + .../models/beta_oidc_service_auth_request.py | 116 + .../beta_oidc_service_authorization_error.py | 101 + .../models/beta_oidc_service_connect_error.py | 104 + ...ta_oidc_service_create_callback_request.py | 137 + ..._oidc_service_create_callback_response.py} | 25 +- .../models/beta_oidc_service_details.py | 98 + .../models/beta_oidc_service_error_reason.py | 52 + ...a_oidc_service_get_auth_request_request.py | 86 + ..._oidc_service_get_auth_request_response.py | 90 + .../models/beta_oidc_service_prompt.py | 41 + .../models/beta_oidc_service_session.py | 88 + ...nization_service_add_human_user_request.py | 137 + ...ation_service_add_organization_request.py} | 34 +- ...ation_service_add_organization_response.py | 102 + .../models/beta_organization_service_admin.py | 137 + .../models/beta_organization_service_any.py | 90 + ...beta_organization_service_connect_error.py | 104 + ...beta_organization_service_created_admin.py | 100 + .../beta_organization_service_details.py | 98 + .../beta_organization_service_gender.py | 39 + ...ta_organization_service_hashed_password.py | 88 + ... => beta_organization_service_idp_link.py} | 18 +- .../beta_organization_service_organization.py | 137 + .../beta_organization_service_password.py | 88 + ...on_service_send_email_verification_code.py | 91 + ...ta_organization_service_set_human_email.py | 151 + ...ta_organization_service_set_human_phone.py | 151 + ..._organization_service_set_human_profile.py | 112 + ...organization_service_set_metadata_entry.py | 88 + .../models/beta_session_service_any.py | 90 + .../models/beta_session_service_challenges.py | 104 + .../beta_session_service_check_idp_intent.py | 88 + .../models/beta_session_service_check_otp.py | 86 + .../beta_session_service_check_password.py | 86 + .../models/beta_session_service_check_totp.py | 86 + .../models/beta_session_service_check_user.py | 137 + .../beta_session_service_check_web_auth_n.py | 99 + .../models/beta_session_service_checks.py | 125 + .../beta_session_service_connect_error.py | 104 + ..._session_service_create_session_request.py | 106 + ...session_service_create_session_response.py | 100 + ...eta_session_service_creation_date_query.py | 90 + ..._session_service_delete_session_request.py | 93 + ...session_service_delete_session_response.py | 90 + .../models/beta_session_service_details.py | 98 + .../models/beta_session_service_factors.py | 125 + ...eta_session_service_get_session_request.py | 93 + ...ta_session_service_get_session_response.py | 90 + ... => beta_session_service_header_values.py} | 8 +- .../models/beta_session_service_ids_query.py | 86 + .../beta_session_service_intent_factor.py | 87 + .../beta_session_service_list_details.py | 101 + .../models/beta_session_service_list_query.py | 95 + ...a_session_service_list_sessions_request.py | 103 + ..._session_service_list_sessions_response.py | 100 + .../models/beta_session_service_otp_email.py | 137 + .../models/beta_session_service_otp_factor.py | 87 + ...psms.py => beta_session_service_otpsms.py} | 10 +- .../beta_session_service_password_factor.py | 87 + ...beta_session_service_request_challenges.py | 102 + .../beta_session_service_search_query.py | 151 + .../models/beta_session_service_send_code.py | 91 + .../models/beta_session_service_session.py | 114 + ...beta_session_service_session_field_name.py | 37 + ...eta_session_service_set_session_request.py | 104 + ...a_session_service_set_session_response.py} | 37 +- ..._session_service_timestamp_query_method.py | 40 + .../beta_session_service_totp_factor.py | 87 + .../models/beta_session_service_user_agent.py | 120 + .../beta_session_service_user_factor.py | 95 + .../beta_session_service_user_id_query.py | 86 + ...n_service_user_verification_requirement.py | 39 + .../models/beta_session_service_value.py | 200 + .../models/beta_session_service_web_auth_n.py | 89 + .../beta_session_service_web_auth_n_factor.py | 89 + .../models/beta_settings_service_any.py | 90 + ...beta_settings_service_branding_settings.py | 107 + .../beta_settings_service_connect_error.py | 104 + .../models/beta_settings_service_details.py | 98 + ... beta_settings_service_domain_settings.py} | 26 +- ...ttings_service_embedded_iframe_settings.py | 88 + ..._get_active_identity_providers_request.py} | 24 +- ..._get_active_identity_providers_response.py | 100 + ...s_service_get_branding_settings_request.py | 90 + ..._service_get_branding_settings_response.py | 96 + ...ngs_service_get_domain_settings_request.py | 90 + ...gs_service_get_domain_settings_response.py | 96 + ..._service_get_general_settings_response.py} | 18 +- ..._get_legal_and_support_settings_request.py | 90 + ...et_legal_and_support_settings_response.py} | 36 +- ...gs_service_get_lockout_settings_request.py | 90 + ...s_service_get_lockout_settings_response.py | 96 + ...ings_service_get_login_settings_request.py | 90 + ...ngs_service_get_login_settings_response.py | 96 + ...t_password_complexity_settings_request.py} | 22 +- ...t_password_complexity_settings_response.py | 96 + ...ce_get_password_expiry_settings_request.py | 90 + ...e_get_password_expiry_settings_response.py | 96 + ..._service_get_security_settings_response.py | 96 + ...beta_settings_service_identity_provider.py | 91 + ...settings_service_identity_provider_type.py | 47 + ...ings_service_legal_and_support_settings.py | 101 + .../beta_settings_service_list_details.py | 101 + ...beta_settings_service_lockout_settings.py} | 33 +- .../beta_settings_service_login_settings.py | 128 + ...beta_settings_service_multi_factor_type.py | 37 + .../beta_settings_service_passkeys_type.py | 37 + ...s_service_password_complexity_settings.py} | 35 +- ...ttings_service_password_expiry_settings.py | 101 + .../beta_settings_service_request_context.py | 137 + ...ta_settings_service_resource_owner_type.py | 38 + ...eta_settings_service_second_factor_type.py | 40 + ...beta_settings_service_security_settings.py | 92 + ...s_service_set_security_settings_request.py | 92 + ..._service_set_security_settings_response.py | 90 + .../models/beta_settings_service_theme.py | 96 + .../beta_settings_service_theme_mode.py | 39 + .../beta_user_service_access_token_type.py | 37 + ...eta_user_service_add_human_user_request.py | 137 + ...ta_user_service_add_human_user_response.py | 106 + .../beta_user_service_add_idp_link_request.py | 92 + ...beta_user_service_add_idp_link_response.py | 90 + ...beta_user_service_add_otp_email_request.py | 86 + ...eta_user_service_add_otp_email_response.py | 90 + .../beta_user_service_add_otpsms_request.py | 86 + .../beta_user_service_add_otpsms_response.py | 90 + ...atus.py => beta_user_service_and_query.py} | 34 +- .../models/beta_user_service_any.py | 90 + ...user_service_authentication_method_type.py | 43 + .../models/beta_user_service_connect_error.py | 104 + ...reate_passkey_registration_link_request.py | 137 + ...eate_passkey_registration_link_response.py | 96 + ...ta_user_service_deactivate_user_request.py | 86 + ..._user_service_deactivate_user_response.py} | 23 +- .../beta_user_service_delete_user_request.py | 86 + .../beta_user_service_delete_user_response.py | 90 + .../models/beta_user_service_details.py | 98 + .../beta_user_service_display_name_query.py | 89 + .../models/beta_user_service_email_query.py | 89 + .../beta_user_service_first_name_query.py | 89 + .../models/beta_user_service_gender.py | 39 + ...eta_user_service_get_user_by_id_request.py | 86 + ...a_user_service_get_user_by_id_response.py} | 36 +- .../beta_user_service_hashed_password.py | 88 + .../models/beta_user_service_human_email.py | 88 + .../models/beta_user_service_human_phone.py | 88 + .../models/beta_user_service_human_profile.py | 114 + .../models/beta_user_service_human_user.py | 118 + .../beta_user_service_idp_information.py | 151 + .../models/beta_user_service_idp_intent.py | 90 + .../models/beta_user_service_idp_link.py | 90 + ...user_service_idpldap_access_information.py | 99 + ...er_service_idpo_auth_access_information.py | 93 + ...user_service_idpsaml_access_information.py | 86 + ...beta_user_service_in_user_emails_query.py} | 12 +- ... => beta_user_service_in_user_id_query.py} | 12 +- .../beta_user_service_last_name_query.py | 89 + .../beta_user_service_ldap_credentials.py | 88 + ...ist_authentication_method_types_request.py | 86 + ...t_authentication_method_types_response.py} | 31 +- .../models/beta_user_service_list_details.py | 101 + .../models/beta_user_service_list_query.py | 95 + ...> beta_user_service_list_users_request.py} | 41 +- .../beta_user_service_list_users_response.py | 103 + ...=> beta_user_service_lock_user_request.py} | 14 +- .../beta_user_service_lock_user_response.py | 90 + .../beta_user_service_login_name_query.py | 89 + .../models/beta_user_service_machine_user.py | 93 + .../beta_user_service_nick_name_query.py | 89 + .../models/beta_user_service_not_query.py | 92 + .../beta_user_service_notification_type.py | 38 + ...tatus.py => beta_user_service_or_query.py} | 34 +- .../models/beta_user_service_organization.py | 137 + ...beta_user_service_organization_id_query.py | 86 + ...beta_user_service_passkey_authenticator.py | 38 + ..._user_service_passkey_registration_code.py | 88 + .../models/beta_user_service_password.py | 88 + ...eta_user_service_password_reset_request.py | 137 + ...ta_user_service_password_reset_response.py | 97 + .../models/beta_user_service_phone_query.py | 89 + ...ta_user_service_reactivate_user_request.py | 86 + ...a_user_service_reactivate_user_response.py | 90 + ....py => beta_user_service_redirect_urls.py} | 18 +- ...a_user_service_register_passkey_request.py | 97 + ..._user_service_register_passkey_response.py | 107 + ...beta_user_service_register_totp_request.py | 86 + ...eta_user_service_register_totp_response.py | 94 + ...beta_user_service_register_u2_f_request.py | 88 + ...eta_user_service_register_u2_f_response.py | 107 + ...a_user_service_remove_otp_email_request.py | 86 + ..._user_service_remove_otp_email_response.py | 90 + ...beta_user_service_remove_otpsms_request.py | 86 + ...eta_user_service_remove_otpsms_response.py | 90 + .../beta_user_service_remove_phone_request.py | 86 + ...beta_user_service_remove_phone_response.py | 90 + .../beta_user_service_remove_totp_request.py | 86 + .../beta_user_service_remove_totp_response.py | 90 + ..._user_service_resend_email_code_request.py | 137 + ...user_service_resend_email_code_response.py | 97 + ..._user_service_resend_phone_code_request.py | 137 + ...user_service_resend_phone_code_response.py | 97 + ...trieve_identity_provider_intent_request.py | 88 + ...rieve_identity_provider_intent_response.py | 98 + .../models/beta_user_service_search_query.py | 335 + ...er_service_send_email_verification_code.py | 91 + ..._service_send_passkey_registration_link.py | 91 + ...a_user_service_send_password_reset_link.py | 94 + .../beta_user_service_set_email_request.py | 151 + ...> beta_user_service_set_email_response.py} | 37 +- .../beta_user_service_set_human_email.py | 151 + .../beta_user_service_set_human_phone.py | 151 + .../beta_user_service_set_human_profile.py | 112 + .../beta_user_service_set_metadata_entry.py | 88 + .../models/beta_user_service_set_password.py | 100 + .../beta_user_service_set_password_request.py | 137 + ...beta_user_service_set_password_response.py | 90 + .../beta_user_service_set_phone_request.py | 151 + .../beta_user_service_set_phone_response.py | 97 + ..._start_identity_provider_intent_request.py | 137 + ...start_identity_provider_intent_response.py | 151 + ...ny.py => beta_user_service_state_query.py} | 17 +- .../beta_user_service_text_query_method.py | 43 + .../models/beta_user_service_type.py | 38 + ...any.py => beta_user_service_type_query.py} | 17 +- .../beta_user_service_unlock_user_request.py | 86 + .../beta_user_service_unlock_user_response.py | 90 + ..._user_service_update_human_user_request.py | 117 + ...user_service_update_human_user_response.py | 104 + .../models/beta_user_service_user.py | 137 + .../beta_user_service_user_field_name.py | 45 + .../beta_user_service_user_name_query.py | 89 + .../models/beta_user_service_user_state.py | 41 + .../models/beta_user_service_value.py | 200 + .../beta_user_service_verify_email_request.py | 88 + ...beta_user_service_verify_email_response.py | 90 + ...ice_verify_passkey_registration_request.py | 105 + ...ce_verify_passkey_registration_response.py | 90 + .../beta_user_service_verify_phone_request.py | 88 + ...beta_user_service_verify_phone_response.py | 90 + ...ervice_verify_totp_registration_request.py | 88 + ...rvice_verify_totp_registration_response.py | 90 + ...ervice_verify_u2_f_registration_request.py | 105 + ...rvice_verify_u2_f_registration_response.py | 90 + ...eb_key_service_activate_web_key_request.py | 86 + ...b_key_service_activate_web_key_response.py | 87 + .../models/beta_web_key_service_any.py | 90 + .../beta_web_key_service_connect_error.py | 104 + ..._web_key_service_create_web_key_request.py | 151 + ...web_key_service_create_web_key_response.py | 89 + ..._web_key_service_delete_web_key_request.py | 86 + ...web_key_service_delete_web_key_response.py | 87 + .../models/beta_web_key_service_ecdsa.py | 87 + ...py => beta_web_key_service_ecdsa_curve.py} | 6 +- ...web_key_service_list_web_keys_response.py} | 14 +- .../models/beta_web_key_service_rsa.py | 90 + ...ts.py => beta_web_key_service_rsa_bits.py} | 6 +- ....py => beta_web_key_service_rsa_hasher.py} | 6 +- ...state.py => beta_web_key_service_state.py} | 6 +- .../models/beta_web_key_service_web_key.py | 151 + zitadel_client/models/creation_date_query.py | 90 + zitadel_client/models/creation_date_query1.py | 90 + zitadel_client/models/creator_query.py | 90 + ...ce_protobuf_any.py => current_password.py} | 14 +- zitadel_client/models/default_query.py | 86 + zitadel_client/models/deny.py | 86 + zitadel_client/models/display_name_query.py | 90 + zitadel_client/models/display_name_query1.py | 90 + zitadel_client/models/domain_query.py | 90 + ...web_key_service_beta_ecdsa.py => ecdsa.py} | 19 +- zitadel_client/models/ed25519.py | 86 + zitadel_client/models/email_query.py | 90 + zitadel_client/models/email_query1.py | 90 + zitadel_client/models/error.py | 90 + zitadel_client/models/error1.py | 90 + zitadel_client/models/error2.py | 90 + zitadel_client/models/event.py | 90 + zitadel_client/models/event1.py | 86 + .../models/execution_type_filter.py | 90 + zitadel_client/models/feature_service_any.py | 90 + .../models/feature_service_connect_error.py | 104 + .../models/feature_service_details.py | 15 +- .../models/feature_service_feature_flag.py | 10 +- ...e_service_get_instance_features_request.py | 86 + ..._service_get_instance_features_response.py | 2 +- ...rvice_get_organization_features_request.py | 88 + ...vice_get_organization_features_response.py | 2 +- ...re_service_get_system_features_response.py | 2 +- ...ature_service_get_user_features_request.py | 88 + ...ture_service_get_user_features_response.py | 2 +- .../feature_service_improved_performance.py | 2 +- ...rvice_improved_performance_feature_flag.py | 6 +- .../models/feature_service_login_v2.py | 7 +- .../feature_service_login_v2_feature_flag.py | 11 +- ...ervice_reset_instance_features_response.py | 2 +- ...ice_reset_organization_features_request.py | 86 + ...ce_reset_organization_features_response.py | 2 +- ..._service_reset_system_features_response.py | 2 +- ...ure_service_reset_user_features_request.py | 86 + ...re_service_reset_user_features_response.py | 2 +- ...e_service_set_instance_features_request.py | 86 +- ..._service_set_instance_features_response.py | 2 +- ...rvice_set_organization_features_request.py | 86 + ...vice_set_organization_features_response.py | 2 +- ...ure_service_set_system_features_request.py | 65 +- ...re_service_set_system_features_response.py | 2 +- ...eature_service_set_user_feature_request.py | 86 + ...ture_service_set_user_features_response.py | 2 +- zitadel_client/models/first_name_query.py | 90 + zitadel_client/models/first_name_query1.py | 90 + zitadel_client/models/function.py | 90 + zitadel_client/models/github.py | 90 + zitadel_client/models/github_es.py | 90 + zitadel_client/models/gitlab.py | 90 + zitadel_client/models/gitlab_self_hosted.py | 90 + zitadel_client/models/google.py | 90 + zitadel_client/models/group.py | 86 + zitadel_client/models/hashed_password.py | 90 + zitadel_client/models/hashed_password1.py | 90 + zitadel_client/models/hashed_password2.py | 90 + zitadel_client/models/hashed_password3.py | 90 + zitadel_client/models/human.py | 90 + zitadel_client/models/human1.py | 90 + zitadel_client/models/human2.py | 90 + zitadel_client/models/human3.py | 90 + zitadel_client/models/id_query.py | 90 + .../models/identity_provider_service_any.py | 90 + ...ty_provider_service_auto_linking_option.py | 2 +- ...entity_provider_service_azure_ad_config.py | 4 +- ...entity_provider_service_azure_ad_tenant.py | 152 +- ...identity_provider_service_connect_error.py | 104 + .../identity_provider_service_details.py | 15 +- ...ty_provider_service_generic_oidc_config.py | 4 +- ...y_provider_service_get_idpby_id_request.py | 86 + ..._provider_service_get_idpby_id_response.py | 2 +- .../models/identity_provider_service_idp.py | 10 +- .../identity_provider_service_idp_config.py | 326 +- .../identity_provider_service_jwt_config.py | 2 +- ...entity_provider_service_ldap_attributes.py | 2 +- .../identity_provider_service_ldap_config.py | 2 +- ...identity_provider_service_o_auth_config.py | 4 +- .../identity_provider_service_options.py | 14 +- .../identity_provider_service_saml_config.py | 24 +- zitadel_client/models/idp_intent.py | 90 + zitadel_client/models/idp_intent1.py | 90 + zitadel_client/models/ids_query.py | 90 + zitadel_client/models/ids_query1.py | 90 + zitadel_client/models/in_conditions_filter.py | 90 + zitadel_client/models/in_target_ids_filter.py | 90 + zitadel_client/models/in_user_emails_query.py | 90 + .../models/in_user_emails_query1.py | 90 + zitadel_client/models/in_user_ids_query.py | 90 + zitadel_client/models/in_user_ids_query1.py | 90 + zitadel_client/models/instance.py | 86 + zitadel_client/models/is_verified.py | 86 + zitadel_client/models/jwt.py | 90 + zitadel_client/models/last_name_query.py | 90 + zitadel_client/models/last_name_query1.py | 90 + zitadel_client/models/ldap.py | 90 + zitadel_client/models/ldap1.py | 90 + zitadel_client/models/ldap2.py | 90 + zitadel_client/models/ldap3.py | 90 + zitadel_client/models/ldap4.py | 90 + zitadel_client/models/login_name.py | 86 + zitadel_client/models/login_name_query.py | 90 + zitadel_client/models/login_name_query1.py | 90 + zitadel_client/models/machine.py | 90 + zitadel_client/models/machine1.py | 90 + ...tion_service_protobuf_any.py => method.py} | 14 +- zitadel_client/models/name_query.py | 90 + zitadel_client/models/nick_name_query.py | 90 + zitadel_client/models/nick_name_query1.py | 90 + zitadel_client/models/no_op200_response.py | 159 + zitadel_client/models/no_op200_response1.py | 110 + zitadel_client/models/no_op200_response10.py | 114 + zitadel_client/models/no_op200_response11.py | 96 + zitadel_client/models/no_op200_response2.py | 122 + zitadel_client/models/no_op200_response3.py | 98 + zitadel_client/models/no_op200_response4.py | 288 + zitadel_client/models/no_op200_response5.py | 140 + zitadel_client/models/no_op200_response6.py | 98 + zitadel_client/models/no_op200_response7.py | 104 + zitadel_client/models/no_op200_response8.py | 152 + zitadel_client/models/no_op200_response9.py | 268 + zitadel_client/models/not_query.py | 92 + zitadel_client/models/not_query1.py | 92 + zitadel_client/models/oauth.py | 90 + zitadel_client/models/oauth1.py | 90 + zitadel_client/models/oauth2.py | 90 + zitadel_client/models/oidc.py | 90 + zitadel_client/models/oidc_service_any.py | 90 + .../models/oidc_service_auth_request.py | 30 +- .../oidc_service_authorization_error.py | 16 +- ...ze_or_deny_device_authorization_request.py | 152 +- .../models/oidc_service_connect_error.py | 104 + .../oidc_service_create_callback_request.py | 153 +- .../oidc_service_create_callback_response.py | 4 +- zitadel_client/models/oidc_service_details.py | 15 +- .../oidc_service_get_auth_request_request.py | 86 + .../oidc_service_get_auth_request_response.py | 2 +- ...et_device_authorization_request_request.py | 86 + ...t_device_authorization_request_response.py | 2 +- zitadel_client/models/oidc_service_session.py | 9 +- zitadel_client/models/or_query.py | 92 + zitadel_client/models/or_query1.py | 92 + zitadel_client/models/org_domain.py | 86 + zitadel_client/models/org_id.py | 86 + .../models/organization_id_query.py | 90 + .../models/organization_id_query1.py | 90 + ...nization_service_add_human_user_request.py | 180 +- ...zation_service_add_organization_request.py | 11 +- ...ation_service_add_organization_response.py | 6 +- .../models/organization_service_admin.py | 137 + .../models/organization_service_any.py | 90 + .../organization_service_connect_error.py | 104 + .../organization_service_created_admin.py | 100 + .../models/organization_service_details.py | 15 +- .../organization_service_hashed_password.py | 7 +- .../models/organization_service_idp_link.py | 11 +- .../organization_service_list_details.py | 20 +- ...tion_service_list_organizations_request.py | 6 +- ...ion_service_list_organizations_response.py | 10 +- .../models/organization_service_list_query.py | 17 +- ...y => organization_service_organization.py} | 14 +- ...ation_service_organization_domain_query.py | 11 +- ...anization_service_organization_id_query.py | 7 +- ...ization_service_organization_name_query.py | 11 +- ...zation_service_organization_state_query.py | 6 +- .../models/organization_service_password.py | 7 +- .../organization_service_search_query.py | 207 +- ...on_service_send_email_verification_code.py | 12 +- .../organization_service_set_human_email.py | 171 +- .../organization_service_set_human_phone.py | 170 +- .../organization_service_set_human_profile.py | 34 +- ...organization_service_set_metadata_entry.py | 9 +- zitadel_client/models/otp.py | 86 + zitadel_client/models/otp_email.py | 86 + zitadel_client/models/otp_sms.py | 86 + zitadel_client/models/password.py | 90 + zitadel_client/models/password1.py | 90 + zitadel_client/models/password2.py | 90 + zitadel_client/models/password3.py | 90 + zitadel_client/models/phone_query.py | 90 + zitadel_client/models/phone_query1.py | 90 + zitadel_client/models/post.py | 90 + zitadel_client/models/post_form.py | 86 + zitadel_client/models/redirect.py | 86 + zitadel_client/models/request.py | 90 + zitadel_client/models/response.py | 90 + zitadel_client/models/rest_async.py | 86 + zitadel_client/models/rest_call.py | 90 + zitadel_client/models/rest_webhook.py | 90 + zitadel_client/models/return_code.py | 86 + zitadel_client/models/return_code1.py | 86 + zitadel_client/models/return_code10.py | 86 + zitadel_client/models/return_code11.py | 86 + zitadel_client/models/return_code12.py | 86 + zitadel_client/models/return_code13.py | 86 + zitadel_client/models/return_code14.py | 86 + zitadel_client/models/return_code2.py | 86 + zitadel_client/models/return_code3.py | 86 + zitadel_client/models/return_code4.py | 86 + zitadel_client/models/return_code5.py | 86 + zitadel_client/models/return_code6.py | 86 + zitadel_client/models/return_code7.py | 86 + zitadel_client/models/return_code8.py | 86 + zitadel_client/models/return_code9.py | 86 + zitadel_client/models/rsa.py | 90 + zitadel_client/models/saml.py | 90 + zitadel_client/models/saml1.py | 90 + zitadel_client/models/saml2.py | 90 + zitadel_client/models/saml_service_any.py | 90 + .../saml_service_authorization_error.py | 11 +- .../models/saml_service_connect_error.py | 104 + .../saml_service_create_response_request.py | 153 +- .../saml_service_create_response_response.py | 157 +- zitadel_client/models/saml_service_details.py | 15 +- .../saml_service_get_saml_request_request.py | 86 + .../saml_service_get_saml_request_response.py | 2 +- .../models/saml_service_post_response.py | 2 +- .../models/saml_service_saml_request.py | 14 +- zitadel_client/models/saml_service_session.py | 9 +- zitadel_client/models/send_code.py | 90 + zitadel_client/models/send_code1.py | 90 + zitadel_client/models/send_code10.py | 86 + zitadel_client/models/send_code2.py | 90 + zitadel_client/models/send_code3.py | 86 + zitadel_client/models/send_code4.py | 90 + zitadel_client/models/send_code5.py | 90 + zitadel_client/models/send_code6.py | 86 + zitadel_client/models/send_code7.py | 90 + zitadel_client/models/send_code8.py | 86 + zitadel_client/models/send_code9.py | 90 + zitadel_client/models/send_link.py | 90 + zitadel_client/models/send_link1.py | 90 + zitadel_client/models/send_link2.py | 90 + zitadel_client/models/send_link3.py | 90 + zitadel_client/models/service.py | 86 + zitadel_client/models/session.py | 90 + zitadel_client/models/session1.py | 90 + zitadel_client/models/session2.py | 90 + zitadel_client/models/session_service_any.py | 90 + .../models/session_service_challenges.py | 18 +- .../session_service_check_idp_intent.py | 9 +- .../models/session_service_check_otp.py | 7 +- .../models/session_service_check_password.py | 7 +- .../models/session_service_check_totp.py | 7 +- .../models/session_service_check_user.py | 152 +- .../session_service_check_web_auth_n.py | 19 +- .../models/session_service_checks.py | 2 +- .../models/session_service_connect_error.py | 104 + .../session_service_create_session_request.py | 6 +- ...session_service_create_session_response.py | 6 +- .../session_service_creation_date_query.py | 8 +- .../models/session_service_creator_query.py | 12 +- .../session_service_delete_session_request.py | 11 +- ...session_service_delete_session_response.py | 2 +- .../models/session_service_details.py | 15 +- .../models/session_service_factors.py | 2 +- ...=> session_service_get_session_request.py} | 24 +- .../session_service_get_session_response.py | 2 +- .../models/session_service_header_values.py | 86 + .../models/session_service_intent_factor.py | 4 +- .../models/session_service_list_details.py | 20 +- .../models/session_service_list_query.py | 17 +- .../session_service_list_sessions_request.py | 4 +- .../models/session_service_otp_email.py | 137 + .../session_service_otp_email_send_code.py | 87 - .../models/session_service_otp_factor.py | 4 +- .../models/session_service_otpsms.py | 86 + .../models/session_service_password_factor.py | 4 +- .../session_service_request_challenges.py | 20 +- .../models/session_service_search_query.py | 208 +- .../models/session_service_send_code.py | 91 + .../models/session_service_session.py | 19 +- .../session_service_set_session_request.py | 11 +- .../session_service_set_session_response.py | 4 +- .../models/session_service_totp_factor.py | 4 +- .../models/session_service_user_agent.py | 23 +- .../session_service_user_agent_query.py | 12 +- .../models/session_service_user_factor.py | 12 +- .../models/session_service_user_id_query.py | 2 +- .../models/session_service_value.py | 200 + ...uth_n.py => session_service_web_auth_n.py} | 14 +- .../session_service_web_auth_n_factor.py | 4 +- zitadel_client/models/settings_service_any.py | 90 + .../settings_service_auto_linking_option.py | 2 +- .../settings_service_branding_settings.py | 16 +- .../models/settings_service_connect_error.py | 104 + .../models/settings_service_details.py | 15 +- .../settings_service_domain_settings.py | 12 +- ...ttings_service_embedded_iframe_settings.py | 4 +- ...e_get_active_identity_providers_request.py | 118 + ...s_service_get_branding_settings_request.py | 90 + ..._service_get_branding_settings_response.py | 2 +- ...ngs_service_get_domain_settings_request.py | 90 + ...gs_service_get_domain_settings_response.py | 2 +- ...s_service_get_general_settings_response.py | 4 +- ..._get_legal_and_support_settings_request.py | 90 + ...get_legal_and_support_settings_response.py | 2 +- ...gs_service_get_lockout_settings_request.py | 90 + ...s_service_get_lockout_settings_response.py | 2 +- ...ings_service_get_login_settings_request.py | 90 + ...ngs_service_get_login_settings_response.py | 2 +- ...et_password_complexity_settings_request.py | 90 + ...t_password_complexity_settings_response.py | 2 +- ...ce_get_password_expiry_settings_request.py | 90 + ...e_get_password_expiry_settings_response.py | 2 +- ..._service_get_security_settings_response.py | 2 +- .../settings_service_identity_provider.py | 6 +- ...ings_service_legal_and_support_settings.py | 14 +- .../models/settings_service_list_details.py | 20 +- .../settings_service_lockout_settings.py | 22 +- .../models/settings_service_login_settings.py | 38 +- .../models/settings_service_options.py | 14 +- ...gs_service_password_complexity_settings.py | 23 +- ...ttings_service_password_expiry_settings.py | 22 +- .../settings_service_request_context.py | 137 + .../settings_service_security_settings.py | 4 +- ...s_service_set_security_settings_request.py | 4 +- ..._service_set_security_settings_response.py | 2 +- .../models/settings_service_theme.py | 8 +- zitadel_client/models/state_query.py | 90 + ...ete_target_response.py => state_query1.py} | 19 +- zitadel_client/models/state_query2.py | 90 + zitadel_client/models/target_filter.py | 90 + ...ges_otp_email.py => target_name_filter.py} | 21 +- zitadel_client/models/tenant_id.py | 86 + ...t_execution_response.py => tenant_type.py} | 16 +- zitadel_client/models/type_query.py | 90 + zitadel_client/models/type_query1.py | 90 + zitadel_client/models/u2f.py | 90 + zitadel_client/models/urls.py | 90 + zitadel_client/models/urls1.py | 90 + zitadel_client/models/user_agent_query.py | 90 + zitadel_client/models/user_id.py | 86 + zitadel_client/models/user_id_query.py | 90 + zitadel_client/models/user_id_query1.py | 90 + zitadel_client/models/user_name_query.py | 90 + zitadel_client/models/user_name_query1.py | 90 + .../user_service_add_human_user_request.py | 180 +- .../user_service_add_human_user_response.py | 12 +- .../user_service_add_idp_link_request.py | 6 +- .../user_service_add_idp_link_response.py | 2 +- .../user_service_add_otp_email_request.py | 86 + .../user_service_add_otp_email_response.py | 2 +- .../models/user_service_add_otpsms_request.py | 86 + .../user_service_add_otpsms_response.py | 2 +- .../models/user_service_and_query.py | 4 +- zitadel_client/models/user_service_any.py | 90 + .../models/user_service_auth_factor.py | 191 +- .../models/user_service_auth_factor_u2_f.py | 2 +- .../models/user_service_auth_factors.py | 39 + .../models/user_service_connect_error.py | 104 + ...user_service_create_invite_code_request.py | 152 +- ...ser_service_create_invite_code_response.py | 7 +- ...reate_passkey_registration_link_request.py | 152 +- ...eate_passkey_registration_link_response.py | 2 +- .../user_service_deactivate_user_request.py | 86 + .../user_service_deactivate_user_response.py | 2 +- .../user_service_delete_user_request.py | 86 + .../user_service_delete_user_response.py | 2 +- zitadel_client/models/user_service_details.py | 15 +- .../models/user_service_display_name_query.py | 11 +- .../models/user_service_domain_query.py | 88 + .../models/user_service_email_query.py | 11 +- .../models/user_service_first_name_query.py | 11 +- .../user_service_get_user_by_id_request.py | 86 + .../user_service_get_user_by_id_response.py | 2 +- .../models/user_service_hashed_password.py | 7 +- .../models/user_service_human_email.py | 7 +- ..._service_human_mfa_init_skipped_request.py | 86 + ...service_human_mfa_init_skipped_response.py | 2 +- .../models/user_service_human_phone.py | 7 +- .../models/user_service_human_profile.py | 34 +- .../models/user_service_human_user.py | 8 +- .../models/user_service_idp_information.py | 180 +- .../models/user_service_idp_intent.py | 11 +- .../models/user_service_idp_link.py | 11 +- ...user_service_idpldap_access_information.py | 21 +- ...er_service_idpo_auth_access_information.py | 7 +- ...user_service_idpsaml_access_information.py | 2 +- .../user_service_in_user_emails_query.py | 2 +- .../models/user_service_in_user_id_query.py | 2 +- .../models/user_service_last_name_query.py | 11 +- .../models/user_service_ldap_credentials.py | 9 +- ...ce_list_authentication_factors_request.py} | 21 +- ...ist_authentication_method_types_request.py | 92 + .../models/user_service_list_details.py | 20 +- .../user_service_list_idp_links_request.py | 6 +- .../user_service_list_passkeys_request.py | 86 + .../models/user_service_list_query.py | 17 +- .../models/user_service_list_users_request.py | 6 +- .../user_service_list_users_response.py | 4 +- ...y.py => user_service_lock_user_request.py} | 14 +- .../models/user_service_lock_user_response.py | 2 +- .../models/user_service_login_name_query.py | 11 +- .../models/user_service_machine_user.py | 6 +- .../models/user_service_nick_name_query.py | 11 +- .../models/user_service_not_query.py | 2 +- .../models/user_service_or_query.py | 4 +- .../models/user_service_organization.py | 151 +- .../user_service_organization_id_query.py | 7 +- zitadel_client/models/user_service_passkey.py | 11 +- .../user_service_passkey_registration_code.py | 9 +- .../models/user_service_password.py | 7 +- .../user_service_password_reset_request.py | 152 +- .../user_service_password_reset_response.py | 9 +- .../models/user_service_phone_query.py | 11 +- .../user_service_reactivate_user_request.py | 86 + .../user_service_reactivate_user_response.py | 2 +- .../models/user_service_redirect_urls.py | 9 +- .../user_service_register_passkey_request.py | 10 +- .../user_service_register_passkey_response.py | 19 +- .../user_service_register_totp_request.py | 86 + .../user_service_register_totp_response.py | 2 +- .../user_service_register_u2_f_request.py | 6 +- .../user_service_register_u2_f_response.py | 19 +- .../user_service_remove_idp_link_request.py | 90 + .../user_service_remove_idp_link_response.py | 2 +- .../user_service_remove_otp_email_request.py | 86 + .../user_service_remove_otp_email_response.py | 2 +- .../user_service_remove_otpsms_request.py | 86 + .../user_service_remove_otpsms_response.py | 2 +- .../user_service_remove_passkey_request.py | 88 + .../user_service_remove_passkey_response.py | 2 +- .../user_service_remove_phone_request.py | 86 + .../user_service_remove_phone_response.py | 2 +- .../user_service_remove_totp_request.py | 86 + .../user_service_remove_totp_response.py | 2 +- .../user_service_remove_u2_f_request.py | 88 + .../user_service_remove_u2_f_response.py | 2 +- .../user_service_resend_email_code_request.py | 152 +- ...user_service_resend_email_code_response.py | 9 +- ...user_service_resend_invite_code_request.py | 86 + ...ser_service_resend_invite_code_response.py | 2 +- .../user_service_resend_phone_code_request.py | 151 +- ...user_service_resend_phone_code_response.py | 9 +- ...trieve_identity_provider_intent_request.py | 9 +- ...rieve_identity_provider_intent_response.py | 4 +- .../models/user_service_rpc_status.py | 98 - .../models/user_service_search_query.py | 393 +- .../user_service_send_email_code_request.py | 152 +- .../user_service_send_email_code_response.py | 9 +- ...er_service_send_email_verification_code.py | 12 +- .../models/user_service_send_invite_code.py | 19 +- ..._service_send_passkey_registration_link.py | 12 +- .../user_service_send_password_reset_link.py | 16 +- .../models/user_service_set_email_request.py | 171 +- .../models/user_service_set_email_response.py | 9 +- .../models/user_service_set_human_email.py | 171 +- .../models/user_service_set_human_phone.py | 170 +- .../models/user_service_set_human_profile.py | 34 +- .../models/user_service_set_metadata_entry.py | 9 +- .../models/user_service_set_password.py | 21 +- .../user_service_set_password_request.py | 155 +- .../user_service_set_password_response.py | 2 +- .../models/user_service_set_phone_request.py | 170 +- .../models/user_service_set_phone_response.py | 9 +- ..._start_identity_provider_intent_request.py | 156 +- ...start_identity_provider_intent_response.py | 171 +- .../models/user_service_state_query.py | 4 +- .../models/user_service_type_query.py | 4 +- .../user_service_unlock_user_request.py | 86 + .../user_service_unlock_user_response.py | 2 +- .../user_service_update_human_user_request.py | 14 +- ...user_service_update_human_user_response.py | 12 +- zitadel_client/models/user_service_user.py | 169 +- .../models/user_service_user_name_query.py | 11 +- zitadel_client/models/user_service_value.py | 200 + .../user_service_verify_email_request.py | 9 +- .../user_service_verify_email_response.py | 2 +- ...user_service_verify_invite_code_request.py | 9 +- ...ser_service_verify_invite_code_response.py | 2 +- ...ice_verify_passkey_registration_request.py | 28 +- ...ce_verify_passkey_registration_response.py | 2 +- .../user_service_verify_phone_request.py | 9 +- .../user_service_verify_phone_response.py | 2 +- ...ervice_verify_totp_registration_request.py | 6 +- ...rvice_verify_totp_registration_response.py | 2 +- ...ervice_verify_u2_f_registration_request.py | 28 +- ...rvice_verify_u2_f_registration_response.py | 2 +- ...e_protobuf_any.py => verification_code.py} | 14 +- .../models/web_key_service_beta_web_key.py | 102 - 843 files changed, 78704 insertions(+), 7816 deletions(-) rename zitadel_client/api/{action_service_api.py => beta_action_service_api.py} (70%) create mode 100644 zitadel_client/api/beta_feature_service_api.py create mode 100644 zitadel_client/api/beta_oidc_service_api.py create mode 100644 zitadel_client/api/beta_organization_service_api.py create mode 100644 zitadel_client/api/beta_session_service_api.py create mode 100644 zitadel_client/api/beta_settings_service_api.py create mode 100644 zitadel_client/api/beta_user_service_api.py rename zitadel_client/api/{web_key_service_api.py => beta_web_key_service_api.py} (60%) delete mode 100644 zitadel_client/models/action_service_beta_condition.py delete mode 100644 zitadel_client/models/action_service_beta_event_execution.py delete mode 100644 zitadel_client/models/action_service_beta_target.py delete mode 100644 zitadel_client/models/action_service_create_target_request.py delete mode 100644 zitadel_client/models/action_service_update_target_request.py create mode 100644 zitadel_client/models/all.py create mode 100644 zitadel_client/models/all1.py rename zitadel_client/models/{web_key_service_beta_delete_web_key_response.py => and_query.py} (75%) create mode 100644 zitadel_client/models/and_query1.py create mode 100644 zitadel_client/models/apple.py rename zitadel_client/models/{oidc_service_protobuf_any.py => auth_url.py} (85%) create mode 100644 zitadel_client/models/azure_ad.py create mode 100644 zitadel_client/models/beta_action_service_any.py create mode 100644 zitadel_client/models/beta_action_service_condition.py create mode 100644 zitadel_client/models/beta_action_service_connect_error.py create mode 100644 zitadel_client/models/beta_action_service_create_target_request.py create mode 100644 zitadel_client/models/beta_action_service_create_target_response.py create mode 100644 zitadel_client/models/beta_action_service_delete_target_request.py create mode 100644 zitadel_client/models/beta_action_service_delete_target_response.py create mode 100644 zitadel_client/models/beta_action_service_event_execution.py create mode 100644 zitadel_client/models/beta_action_service_execution.py create mode 100644 zitadel_client/models/beta_action_service_execution_field_name.py create mode 100644 zitadel_client/models/beta_action_service_execution_search_filter.py create mode 100644 zitadel_client/models/beta_action_service_execution_type.py rename zitadel_client/models/{web_key_service_beta_activate_web_key_response.py => beta_action_service_execution_type_filter.py} (79%) rename zitadel_client/models/{action_service_beta_function_execution.py => beta_action_service_function_execution.py} (89%) create mode 100644 zitadel_client/models/beta_action_service_get_target_request.py rename zitadel_client/models/{action_service_beta_get_target_response.py => beta_action_service_get_target_response.py} (83%) rename zitadel_client/models/{saml_service_rpc_status.py => beta_action_service_in_conditions_filter.py} (70%) rename zitadel_client/models/{action_service_beta_in_target_ids_filter.py => beta_action_service_in_target_ids_filter.py} (89%) rename zitadel_client/models/{action_service_beta_list_execution_functions_response.py => beta_action_service_list_execution_functions_response.py} (85%) rename zitadel_client/models/{action_service_beta_list_execution_methods_response.py => beta_action_service_list_execution_methods_response.py} (85%) rename zitadel_client/models/{action_service_beta_list_execution_services_response.py => beta_action_service_list_execution_services_response.py} (85%) create mode 100644 zitadel_client/models/beta_action_service_list_executions_request.py rename zitadel_client/models/{action_service_beta_list_executions_response.py => beta_action_service_list_executions_response.py} (81%) rename zitadel_client/models/{action_service_list_targets_request.py => beta_action_service_list_targets_request.py} (72%) rename zitadel_client/models/{action_service_beta_list_targets_response.py => beta_action_service_list_targets_response.py} (81%) rename zitadel_client/models/{action_service_beta_pagination_request.py => beta_action_service_pagination_request.py} (74%) rename zitadel_client/models/{action_service_beta_target_name_filter.py => beta_action_service_pagination_response.py} (64%) create mode 100644 zitadel_client/models/beta_action_service_request_execution.py create mode 100644 zitadel_client/models/beta_action_service_response_execution.py rename zitadel_client/models/{action_service_beta_rest_call.py => beta_action_service_rest_call.py} (90%) rename zitadel_client/models/{action_service_beta_rest_webhook.py => beta_action_service_rest_webhook.py} (90%) rename zitadel_client/models/{action_service_set_execution_request.py => beta_action_service_set_execution_request.py} (84%) create mode 100644 zitadel_client/models/beta_action_service_set_execution_response.py create mode 100644 zitadel_client/models/beta_action_service_target.py rename zitadel_client/models/{action_service_beta_target_field_name.py => beta_action_service_target_field_name.py} (89%) create mode 100644 zitadel_client/models/beta_action_service_target_filter.py create mode 100644 zitadel_client/models/beta_action_service_target_name_filter.py create mode 100644 zitadel_client/models/beta_action_service_target_search_filter.py rename zitadel_client/models/{action_service_beta_text_filter_method.py => beta_action_service_text_filter_method.py} (89%) create mode 100644 zitadel_client/models/beta_action_service_update_target_request.py create mode 100644 zitadel_client/models/beta_action_service_update_target_response.py create mode 100644 zitadel_client/models/beta_feature_service_any.py create mode 100644 zitadel_client/models/beta_feature_service_connect_error.py create mode 100644 zitadel_client/models/beta_feature_service_details.py create mode 100644 zitadel_client/models/beta_feature_service_feature_flag.py create mode 100644 zitadel_client/models/beta_feature_service_get_instance_features_request.py create mode 100644 zitadel_client/models/beta_feature_service_get_instance_features_response.py create mode 100644 zitadel_client/models/beta_feature_service_get_organization_features_request.py create mode 100644 zitadel_client/models/beta_feature_service_get_organization_features_response.py create mode 100644 zitadel_client/models/beta_feature_service_get_system_features_response.py create mode 100644 zitadel_client/models/beta_feature_service_get_user_features_request.py create mode 100644 zitadel_client/models/beta_feature_service_get_user_features_response.py create mode 100644 zitadel_client/models/beta_feature_service_improved_performance.py rename zitadel_client/models/{session_service_challenges_web_auth_n.py => beta_feature_service_improved_performance_feature_flag.py} (74%) create mode 100644 zitadel_client/models/beta_feature_service_reset_instance_features_response.py create mode 100644 zitadel_client/models/beta_feature_service_reset_organization_features_request.py create mode 100644 zitadel_client/models/beta_feature_service_reset_organization_features_response.py create mode 100644 zitadel_client/models/beta_feature_service_reset_system_features_response.py create mode 100644 zitadel_client/models/beta_feature_service_reset_user_features_request.py create mode 100644 zitadel_client/models/beta_feature_service_reset_user_features_response.py create mode 100644 zitadel_client/models/beta_feature_service_set_instance_features_request.py create mode 100644 zitadel_client/models/beta_feature_service_set_instance_features_response.py create mode 100644 zitadel_client/models/beta_feature_service_set_organization_features_request.py create mode 100644 zitadel_client/models/beta_feature_service_set_organization_features_response.py create mode 100644 zitadel_client/models/beta_feature_service_set_system_features_request.py create mode 100644 zitadel_client/models/beta_feature_service_set_system_features_response.py create mode 100644 zitadel_client/models/beta_feature_service_set_user_feature_request.py create mode 100644 zitadel_client/models/beta_feature_service_set_user_features_response.py create mode 100644 zitadel_client/models/beta_feature_service_source.py create mode 100644 zitadel_client/models/beta_oidc_service_any.py create mode 100644 zitadel_client/models/beta_oidc_service_auth_request.py create mode 100644 zitadel_client/models/beta_oidc_service_authorization_error.py create mode 100644 zitadel_client/models/beta_oidc_service_connect_error.py create mode 100644 zitadel_client/models/beta_oidc_service_create_callback_request.py rename zitadel_client/models/{action_service_beta_create_target_response.py => beta_oidc_service_create_callback_response.py} (73%) create mode 100644 zitadel_client/models/beta_oidc_service_details.py create mode 100644 zitadel_client/models/beta_oidc_service_error_reason.py create mode 100644 zitadel_client/models/beta_oidc_service_get_auth_request_request.py create mode 100644 zitadel_client/models/beta_oidc_service_get_auth_request_response.py create mode 100644 zitadel_client/models/beta_oidc_service_prompt.py create mode 100644 zitadel_client/models/beta_oidc_service_session.py create mode 100644 zitadel_client/models/beta_organization_service_add_human_user_request.py rename zitadel_client/models/{oidc_service_rpc_status.py => beta_organization_service_add_organization_request.py} (71%) create mode 100644 zitadel_client/models/beta_organization_service_add_organization_response.py create mode 100644 zitadel_client/models/beta_organization_service_admin.py create mode 100644 zitadel_client/models/beta_organization_service_any.py create mode 100644 zitadel_client/models/beta_organization_service_connect_error.py create mode 100644 zitadel_client/models/beta_organization_service_created_admin.py create mode 100644 zitadel_client/models/beta_organization_service_details.py create mode 100644 zitadel_client/models/beta_organization_service_gender.py create mode 100644 zitadel_client/models/beta_organization_service_hashed_password.py rename zitadel_client/models/{organization_service_add_organization_response_created_admin.py => beta_organization_service_idp_link.py} (78%) create mode 100644 zitadel_client/models/beta_organization_service_organization.py create mode 100644 zitadel_client/models/beta_organization_service_password.py create mode 100644 zitadel_client/models/beta_organization_service_send_email_verification_code.py create mode 100644 zitadel_client/models/beta_organization_service_set_human_email.py create mode 100644 zitadel_client/models/beta_organization_service_set_human_phone.py create mode 100644 zitadel_client/models/beta_organization_service_set_human_profile.py create mode 100644 zitadel_client/models/beta_organization_service_set_metadata_entry.py create mode 100644 zitadel_client/models/beta_session_service_any.py create mode 100644 zitadel_client/models/beta_session_service_challenges.py create mode 100644 zitadel_client/models/beta_session_service_check_idp_intent.py create mode 100644 zitadel_client/models/beta_session_service_check_otp.py create mode 100644 zitadel_client/models/beta_session_service_check_password.py create mode 100644 zitadel_client/models/beta_session_service_check_totp.py create mode 100644 zitadel_client/models/beta_session_service_check_user.py create mode 100644 zitadel_client/models/beta_session_service_check_web_auth_n.py create mode 100644 zitadel_client/models/beta_session_service_checks.py create mode 100644 zitadel_client/models/beta_session_service_connect_error.py create mode 100644 zitadel_client/models/beta_session_service_create_session_request.py create mode 100644 zitadel_client/models/beta_session_service_create_session_response.py create mode 100644 zitadel_client/models/beta_session_service_creation_date_query.py create mode 100644 zitadel_client/models/beta_session_service_delete_session_request.py create mode 100644 zitadel_client/models/beta_session_service_delete_session_response.py create mode 100644 zitadel_client/models/beta_session_service_details.py create mode 100644 zitadel_client/models/beta_session_service_factors.py create mode 100644 zitadel_client/models/beta_session_service_get_session_request.py create mode 100644 zitadel_client/models/beta_session_service_get_session_response.py rename zitadel_client/models/{session_service_user_agent_header_values.py => beta_session_service_header_values.py} (86%) create mode 100644 zitadel_client/models/beta_session_service_ids_query.py create mode 100644 zitadel_client/models/beta_session_service_intent_factor.py create mode 100644 zitadel_client/models/beta_session_service_list_details.py create mode 100644 zitadel_client/models/beta_session_service_list_query.py create mode 100644 zitadel_client/models/beta_session_service_list_sessions_request.py create mode 100644 zitadel_client/models/beta_session_service_list_sessions_response.py create mode 100644 zitadel_client/models/beta_session_service_otp_email.py create mode 100644 zitadel_client/models/beta_session_service_otp_factor.py rename zitadel_client/models/{session_service_request_challenges_otpsms.py => beta_session_service_otpsms.py} (87%) create mode 100644 zitadel_client/models/beta_session_service_password_factor.py create mode 100644 zitadel_client/models/beta_session_service_request_challenges.py create mode 100644 zitadel_client/models/beta_session_service_search_query.py create mode 100644 zitadel_client/models/beta_session_service_send_code.py create mode 100644 zitadel_client/models/beta_session_service_session.py create mode 100644 zitadel_client/models/beta_session_service_session_field_name.py create mode 100644 zitadel_client/models/beta_session_service_set_session_request.py rename zitadel_client/models/{action_service_beta_execution.py => beta_session_service_set_session_response.py} (64%) create mode 100644 zitadel_client/models/beta_session_service_timestamp_query_method.py create mode 100644 zitadel_client/models/beta_session_service_totp_factor.py create mode 100644 zitadel_client/models/beta_session_service_user_agent.py create mode 100644 zitadel_client/models/beta_session_service_user_factor.py create mode 100644 zitadel_client/models/beta_session_service_user_id_query.py create mode 100644 zitadel_client/models/beta_session_service_user_verification_requirement.py create mode 100644 zitadel_client/models/beta_session_service_value.py create mode 100644 zitadel_client/models/beta_session_service_web_auth_n.py create mode 100644 zitadel_client/models/beta_session_service_web_auth_n_factor.py create mode 100644 zitadel_client/models/beta_settings_service_any.py create mode 100644 zitadel_client/models/beta_settings_service_branding_settings.py create mode 100644 zitadel_client/models/beta_settings_service_connect_error.py create mode 100644 zitadel_client/models/beta_settings_service_details.py rename zitadel_client/models/{action_service_beta_request_execution.py => beta_settings_service_domain_settings.py} (64%) create mode 100644 zitadel_client/models/beta_settings_service_embedded_iframe_settings.py rename zitadel_client/models/{web_key_service_create_web_key_request.py => beta_settings_service_get_active_identity_providers_request.py} (71%) create mode 100644 zitadel_client/models/beta_settings_service_get_active_identity_providers_response.py create mode 100644 zitadel_client/models/beta_settings_service_get_branding_settings_request.py create mode 100644 zitadel_client/models/beta_settings_service_get_branding_settings_response.py create mode 100644 zitadel_client/models/beta_settings_service_get_domain_settings_request.py create mode 100644 zitadel_client/models/beta_settings_service_get_domain_settings_response.py rename zitadel_client/models/{action_service_beta_pagination_response.py => beta_settings_service_get_general_settings_response.py} (75%) create mode 100644 zitadel_client/models/beta_settings_service_get_legal_and_support_settings_request.py rename zitadel_client/models/{web_key_service_rpc_status.py => beta_settings_service_get_legal_and_support_settings_response.py} (64%) create mode 100644 zitadel_client/models/beta_settings_service_get_lockout_settings_request.py create mode 100644 zitadel_client/models/beta_settings_service_get_lockout_settings_response.py create mode 100644 zitadel_client/models/beta_settings_service_get_login_settings_request.py create mode 100644 zitadel_client/models/beta_settings_service_get_login_settings_response.py rename zitadel_client/models/{web_key_service_beta_rsa.py => beta_settings_service_get_password_complexity_settings_request.py} (71%) create mode 100644 zitadel_client/models/beta_settings_service_get_password_complexity_settings_response.py create mode 100644 zitadel_client/models/beta_settings_service_get_password_expiry_settings_request.py create mode 100644 zitadel_client/models/beta_settings_service_get_password_expiry_settings_response.py create mode 100644 zitadel_client/models/beta_settings_service_get_security_settings_response.py create mode 100644 zitadel_client/models/beta_settings_service_identity_provider.py create mode 100644 zitadel_client/models/beta_settings_service_identity_provider_type.py create mode 100644 zitadel_client/models/beta_settings_service_legal_and_support_settings.py create mode 100644 zitadel_client/models/beta_settings_service_list_details.py rename zitadel_client/models/{action_service_beta_target_search_filter.py => beta_settings_service_lockout_settings.py} (61%) create mode 100644 zitadel_client/models/beta_settings_service_login_settings.py create mode 100644 zitadel_client/models/beta_settings_service_multi_factor_type.py create mode 100644 zitadel_client/models/beta_settings_service_passkeys_type.py rename zitadel_client/models/{action_service_beta_response_execution.py => beta_settings_service_password_complexity_settings.py} (58%) create mode 100644 zitadel_client/models/beta_settings_service_password_expiry_settings.py create mode 100644 zitadel_client/models/beta_settings_service_request_context.py create mode 100644 zitadel_client/models/beta_settings_service_resource_owner_type.py create mode 100644 zitadel_client/models/beta_settings_service_second_factor_type.py create mode 100644 zitadel_client/models/beta_settings_service_security_settings.py create mode 100644 zitadel_client/models/beta_settings_service_set_security_settings_request.py create mode 100644 zitadel_client/models/beta_settings_service_set_security_settings_response.py create mode 100644 zitadel_client/models/beta_settings_service_theme.py create mode 100644 zitadel_client/models/beta_settings_service_theme_mode.py create mode 100644 zitadel_client/models/beta_user_service_access_token_type.py create mode 100644 zitadel_client/models/beta_user_service_add_human_user_request.py create mode 100644 zitadel_client/models/beta_user_service_add_human_user_response.py create mode 100644 zitadel_client/models/beta_user_service_add_idp_link_request.py create mode 100644 zitadel_client/models/beta_user_service_add_idp_link_response.py create mode 100644 zitadel_client/models/beta_user_service_add_otp_email_request.py create mode 100644 zitadel_client/models/beta_user_service_add_otp_email_response.py create mode 100644 zitadel_client/models/beta_user_service_add_otpsms_request.py create mode 100644 zitadel_client/models/beta_user_service_add_otpsms_response.py rename zitadel_client/models/{session_service_rpc_status.py => beta_user_service_and_query.py} (71%) create mode 100644 zitadel_client/models/beta_user_service_any.py create mode 100644 zitadel_client/models/beta_user_service_authentication_method_type.py create mode 100644 zitadel_client/models/beta_user_service_connect_error.py create mode 100644 zitadel_client/models/beta_user_service_create_passkey_registration_link_request.py create mode 100644 zitadel_client/models/beta_user_service_create_passkey_registration_link_response.py create mode 100644 zitadel_client/models/beta_user_service_deactivate_user_request.py rename zitadel_client/models/{web_key_service_beta_create_web_key_response.py => beta_user_service_deactivate_user_response.py} (75%) create mode 100644 zitadel_client/models/beta_user_service_delete_user_request.py create mode 100644 zitadel_client/models/beta_user_service_delete_user_response.py create mode 100644 zitadel_client/models/beta_user_service_details.py create mode 100644 zitadel_client/models/beta_user_service_display_name_query.py create mode 100644 zitadel_client/models/beta_user_service_email_query.py create mode 100644 zitadel_client/models/beta_user_service_first_name_query.py create mode 100644 zitadel_client/models/beta_user_service_gender.py create mode 100644 zitadel_client/models/beta_user_service_get_user_by_id_request.py rename zitadel_client/models/{feature_service_rpc_status.py => beta_user_service_get_user_by_id_response.py} (68%) create mode 100644 zitadel_client/models/beta_user_service_hashed_password.py create mode 100644 zitadel_client/models/beta_user_service_human_email.py create mode 100644 zitadel_client/models/beta_user_service_human_phone.py create mode 100644 zitadel_client/models/beta_user_service_human_profile.py create mode 100644 zitadel_client/models/beta_user_service_human_user.py create mode 100644 zitadel_client/models/beta_user_service_idp_information.py create mode 100644 zitadel_client/models/beta_user_service_idp_intent.py create mode 100644 zitadel_client/models/beta_user_service_idp_link.py create mode 100644 zitadel_client/models/beta_user_service_idpldap_access_information.py create mode 100644 zitadel_client/models/beta_user_service_idpo_auth_access_information.py create mode 100644 zitadel_client/models/beta_user_service_idpsaml_access_information.py rename zitadel_client/models/{identity_provider_service_protobuf_any.py => beta_user_service_in_user_emails_query.py} (85%) rename zitadel_client/models/{feature_service_protobuf_any.py => beta_user_service_in_user_id_query.py} (86%) create mode 100644 zitadel_client/models/beta_user_service_last_name_query.py create mode 100644 zitadel_client/models/beta_user_service_ldap_credentials.py create mode 100644 zitadel_client/models/beta_user_service_list_authentication_method_types_request.py rename zitadel_client/models/{organization_service_rpc_status.py => beta_user_service_list_authentication_method_types_response.py} (69%) create mode 100644 zitadel_client/models/beta_user_service_list_details.py create mode 100644 zitadel_client/models/beta_user_service_list_query.py rename zitadel_client/models/{settings_service_rpc_status.py => beta_user_service_list_users_request.py} (60%) create mode 100644 zitadel_client/models/beta_user_service_list_users_response.py rename zitadel_client/models/{organization_service_protobuf_any.py => beta_user_service_lock_user_request.py} (86%) create mode 100644 zitadel_client/models/beta_user_service_lock_user_response.py create mode 100644 zitadel_client/models/beta_user_service_login_name_query.py create mode 100644 zitadel_client/models/beta_user_service_machine_user.py create mode 100644 zitadel_client/models/beta_user_service_nick_name_query.py create mode 100644 zitadel_client/models/beta_user_service_not_query.py create mode 100644 zitadel_client/models/beta_user_service_notification_type.py rename zitadel_client/models/{action_service_rpc_status.py => beta_user_service_or_query.py} (71%) create mode 100644 zitadel_client/models/beta_user_service_organization.py create mode 100644 zitadel_client/models/beta_user_service_organization_id_query.py create mode 100644 zitadel_client/models/beta_user_service_passkey_authenticator.py create mode 100644 zitadel_client/models/beta_user_service_passkey_registration_code.py create mode 100644 zitadel_client/models/beta_user_service_password.py create mode 100644 zitadel_client/models/beta_user_service_password_reset_request.py create mode 100644 zitadel_client/models/beta_user_service_password_reset_response.py create mode 100644 zitadel_client/models/beta_user_service_phone_query.py create mode 100644 zitadel_client/models/beta_user_service_reactivate_user_request.py create mode 100644 zitadel_client/models/beta_user_service_reactivate_user_response.py rename zitadel_client/models/{zitadelobjectv2_organization.py => beta_user_service_redirect_urls.py} (81%) create mode 100644 zitadel_client/models/beta_user_service_register_passkey_request.py create mode 100644 zitadel_client/models/beta_user_service_register_passkey_response.py create mode 100644 zitadel_client/models/beta_user_service_register_totp_request.py create mode 100644 zitadel_client/models/beta_user_service_register_totp_response.py create mode 100644 zitadel_client/models/beta_user_service_register_u2_f_request.py create mode 100644 zitadel_client/models/beta_user_service_register_u2_f_response.py create mode 100644 zitadel_client/models/beta_user_service_remove_otp_email_request.py create mode 100644 zitadel_client/models/beta_user_service_remove_otp_email_response.py create mode 100644 zitadel_client/models/beta_user_service_remove_otpsms_request.py create mode 100644 zitadel_client/models/beta_user_service_remove_otpsms_response.py create mode 100644 zitadel_client/models/beta_user_service_remove_phone_request.py create mode 100644 zitadel_client/models/beta_user_service_remove_phone_response.py create mode 100644 zitadel_client/models/beta_user_service_remove_totp_request.py create mode 100644 zitadel_client/models/beta_user_service_remove_totp_response.py create mode 100644 zitadel_client/models/beta_user_service_resend_email_code_request.py create mode 100644 zitadel_client/models/beta_user_service_resend_email_code_response.py create mode 100644 zitadel_client/models/beta_user_service_resend_phone_code_request.py create mode 100644 zitadel_client/models/beta_user_service_resend_phone_code_response.py create mode 100644 zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_request.py create mode 100644 zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_response.py create mode 100644 zitadel_client/models/beta_user_service_search_query.py create mode 100644 zitadel_client/models/beta_user_service_send_email_verification_code.py create mode 100644 zitadel_client/models/beta_user_service_send_passkey_registration_link.py create mode 100644 zitadel_client/models/beta_user_service_send_password_reset_link.py create mode 100644 zitadel_client/models/beta_user_service_set_email_request.py rename zitadel_client/models/{identity_provider_service_rpc_status.py => beta_user_service_set_email_response.py} (66%) create mode 100644 zitadel_client/models/beta_user_service_set_human_email.py create mode 100644 zitadel_client/models/beta_user_service_set_human_phone.py create mode 100644 zitadel_client/models/beta_user_service_set_human_profile.py create mode 100644 zitadel_client/models/beta_user_service_set_metadata_entry.py create mode 100644 zitadel_client/models/beta_user_service_set_password.py create mode 100644 zitadel_client/models/beta_user_service_set_password_request.py create mode 100644 zitadel_client/models/beta_user_service_set_password_response.py create mode 100644 zitadel_client/models/beta_user_service_set_phone_request.py create mode 100644 zitadel_client/models/beta_user_service_set_phone_response.py create mode 100644 zitadel_client/models/beta_user_service_start_identity_provider_intent_request.py create mode 100644 zitadel_client/models/beta_user_service_start_identity_provider_intent_response.py rename zitadel_client/models/{session_service_protobuf_any.py => beta_user_service_state_query.py} (82%) create mode 100644 zitadel_client/models/beta_user_service_text_query_method.py create mode 100644 zitadel_client/models/beta_user_service_type.py rename zitadel_client/models/{web_key_service_protobuf_any.py => beta_user_service_type_query.py} (83%) create mode 100644 zitadel_client/models/beta_user_service_unlock_user_request.py create mode 100644 zitadel_client/models/beta_user_service_unlock_user_response.py create mode 100644 zitadel_client/models/beta_user_service_update_human_user_request.py create mode 100644 zitadel_client/models/beta_user_service_update_human_user_response.py create mode 100644 zitadel_client/models/beta_user_service_user.py create mode 100644 zitadel_client/models/beta_user_service_user_field_name.py create mode 100644 zitadel_client/models/beta_user_service_user_name_query.py create mode 100644 zitadel_client/models/beta_user_service_user_state.py create mode 100644 zitadel_client/models/beta_user_service_value.py create mode 100644 zitadel_client/models/beta_user_service_verify_email_request.py create mode 100644 zitadel_client/models/beta_user_service_verify_email_response.py create mode 100644 zitadel_client/models/beta_user_service_verify_passkey_registration_request.py create mode 100644 zitadel_client/models/beta_user_service_verify_passkey_registration_response.py create mode 100644 zitadel_client/models/beta_user_service_verify_phone_request.py create mode 100644 zitadel_client/models/beta_user_service_verify_phone_response.py create mode 100644 zitadel_client/models/beta_user_service_verify_totp_registration_request.py create mode 100644 zitadel_client/models/beta_user_service_verify_totp_registration_response.py create mode 100644 zitadel_client/models/beta_user_service_verify_u2_f_registration_request.py create mode 100644 zitadel_client/models/beta_user_service_verify_u2_f_registration_response.py create mode 100644 zitadel_client/models/beta_web_key_service_activate_web_key_request.py create mode 100644 zitadel_client/models/beta_web_key_service_activate_web_key_response.py create mode 100644 zitadel_client/models/beta_web_key_service_any.py create mode 100644 zitadel_client/models/beta_web_key_service_connect_error.py create mode 100644 zitadel_client/models/beta_web_key_service_create_web_key_request.py create mode 100644 zitadel_client/models/beta_web_key_service_create_web_key_response.py create mode 100644 zitadel_client/models/beta_web_key_service_delete_web_key_request.py create mode 100644 zitadel_client/models/beta_web_key_service_delete_web_key_response.py create mode 100644 zitadel_client/models/beta_web_key_service_ecdsa.py rename zitadel_client/models/{web_key_service_beta_ecdsa_curve.py => beta_web_key_service_ecdsa_curve.py} (86%) rename zitadel_client/models/{web_key_service_beta_list_web_keys_response.py => beta_web_key_service_list_web_keys_response.py} (86%) create mode 100644 zitadel_client/models/beta_web_key_service_rsa.py rename zitadel_client/models/{web_key_service_beta_rsa_bits.py => beta_web_key_service_rsa_bits.py} (86%) rename zitadel_client/models/{web_key_service_beta_rsa_hasher.py => beta_web_key_service_rsa_hasher.py} (86%) rename zitadel_client/models/{web_key_service_beta_state.py => beta_web_key_service_state.py} (62%) create mode 100644 zitadel_client/models/beta_web_key_service_web_key.py create mode 100644 zitadel_client/models/creation_date_query.py create mode 100644 zitadel_client/models/creation_date_query1.py create mode 100644 zitadel_client/models/creator_query.py rename zitadel_client/models/{saml_service_protobuf_any.py => current_password.py} (85%) create mode 100644 zitadel_client/models/default_query.py create mode 100644 zitadel_client/models/deny.py create mode 100644 zitadel_client/models/display_name_query.py create mode 100644 zitadel_client/models/display_name_query1.py create mode 100644 zitadel_client/models/domain_query.py rename zitadel_client/models/{web_key_service_beta_ecdsa.py => ecdsa.py} (79%) create mode 100644 zitadel_client/models/ed25519.py create mode 100644 zitadel_client/models/email_query.py create mode 100644 zitadel_client/models/email_query1.py create mode 100644 zitadel_client/models/error.py create mode 100644 zitadel_client/models/error1.py create mode 100644 zitadel_client/models/error2.py create mode 100644 zitadel_client/models/event.py create mode 100644 zitadel_client/models/event1.py create mode 100644 zitadel_client/models/execution_type_filter.py create mode 100644 zitadel_client/models/feature_service_any.py create mode 100644 zitadel_client/models/feature_service_connect_error.py create mode 100644 zitadel_client/models/feature_service_get_instance_features_request.py create mode 100644 zitadel_client/models/feature_service_get_organization_features_request.py create mode 100644 zitadel_client/models/feature_service_get_user_features_request.py create mode 100644 zitadel_client/models/feature_service_reset_organization_features_request.py create mode 100644 zitadel_client/models/feature_service_reset_user_features_request.py create mode 100644 zitadel_client/models/feature_service_set_organization_features_request.py create mode 100644 zitadel_client/models/feature_service_set_user_feature_request.py create mode 100644 zitadel_client/models/first_name_query.py create mode 100644 zitadel_client/models/first_name_query1.py create mode 100644 zitadel_client/models/function.py create mode 100644 zitadel_client/models/github.py create mode 100644 zitadel_client/models/github_es.py create mode 100644 zitadel_client/models/gitlab.py create mode 100644 zitadel_client/models/gitlab_self_hosted.py create mode 100644 zitadel_client/models/google.py create mode 100644 zitadel_client/models/group.py create mode 100644 zitadel_client/models/hashed_password.py create mode 100644 zitadel_client/models/hashed_password1.py create mode 100644 zitadel_client/models/hashed_password2.py create mode 100644 zitadel_client/models/hashed_password3.py create mode 100644 zitadel_client/models/human.py create mode 100644 zitadel_client/models/human1.py create mode 100644 zitadel_client/models/human2.py create mode 100644 zitadel_client/models/human3.py create mode 100644 zitadel_client/models/id_query.py create mode 100644 zitadel_client/models/identity_provider_service_any.py create mode 100644 zitadel_client/models/identity_provider_service_connect_error.py create mode 100644 zitadel_client/models/identity_provider_service_get_idpby_id_request.py create mode 100644 zitadel_client/models/idp_intent.py create mode 100644 zitadel_client/models/idp_intent1.py create mode 100644 zitadel_client/models/ids_query.py create mode 100644 zitadel_client/models/ids_query1.py create mode 100644 zitadel_client/models/in_conditions_filter.py create mode 100644 zitadel_client/models/in_target_ids_filter.py create mode 100644 zitadel_client/models/in_user_emails_query.py create mode 100644 zitadel_client/models/in_user_emails_query1.py create mode 100644 zitadel_client/models/in_user_ids_query.py create mode 100644 zitadel_client/models/in_user_ids_query1.py create mode 100644 zitadel_client/models/instance.py create mode 100644 zitadel_client/models/is_verified.py create mode 100644 zitadel_client/models/jwt.py create mode 100644 zitadel_client/models/last_name_query.py create mode 100644 zitadel_client/models/last_name_query1.py create mode 100644 zitadel_client/models/ldap.py create mode 100644 zitadel_client/models/ldap1.py create mode 100644 zitadel_client/models/ldap2.py create mode 100644 zitadel_client/models/ldap3.py create mode 100644 zitadel_client/models/ldap4.py create mode 100644 zitadel_client/models/login_name.py create mode 100644 zitadel_client/models/login_name_query.py create mode 100644 zitadel_client/models/login_name_query1.py create mode 100644 zitadel_client/models/machine.py create mode 100644 zitadel_client/models/machine1.py rename zitadel_client/models/{action_service_protobuf_any.py => method.py} (87%) create mode 100644 zitadel_client/models/name_query.py create mode 100644 zitadel_client/models/nick_name_query.py create mode 100644 zitadel_client/models/nick_name_query1.py create mode 100644 zitadel_client/models/no_op200_response.py create mode 100644 zitadel_client/models/no_op200_response1.py create mode 100644 zitadel_client/models/no_op200_response10.py create mode 100644 zitadel_client/models/no_op200_response11.py create mode 100644 zitadel_client/models/no_op200_response2.py create mode 100644 zitadel_client/models/no_op200_response3.py create mode 100644 zitadel_client/models/no_op200_response4.py create mode 100644 zitadel_client/models/no_op200_response5.py create mode 100644 zitadel_client/models/no_op200_response6.py create mode 100644 zitadel_client/models/no_op200_response7.py create mode 100644 zitadel_client/models/no_op200_response8.py create mode 100644 zitadel_client/models/no_op200_response9.py create mode 100644 zitadel_client/models/not_query.py create mode 100644 zitadel_client/models/not_query1.py create mode 100644 zitadel_client/models/oauth.py create mode 100644 zitadel_client/models/oauth1.py create mode 100644 zitadel_client/models/oauth2.py create mode 100644 zitadel_client/models/oidc.py create mode 100644 zitadel_client/models/oidc_service_any.py create mode 100644 zitadel_client/models/oidc_service_connect_error.py create mode 100644 zitadel_client/models/oidc_service_get_auth_request_request.py create mode 100644 zitadel_client/models/oidc_service_get_device_authorization_request_request.py create mode 100644 zitadel_client/models/or_query.py create mode 100644 zitadel_client/models/or_query1.py create mode 100644 zitadel_client/models/org_domain.py create mode 100644 zitadel_client/models/org_id.py create mode 100644 zitadel_client/models/organization_id_query.py create mode 100644 zitadel_client/models/organization_id_query1.py create mode 100644 zitadel_client/models/organization_service_admin.py create mode 100644 zitadel_client/models/organization_service_any.py create mode 100644 zitadel_client/models/organization_service_connect_error.py create mode 100644 zitadel_client/models/organization_service_created_admin.py rename zitadel_client/models/{zitadelorgv2_organization.py => organization_service_organization.py} (85%) create mode 100644 zitadel_client/models/otp.py create mode 100644 zitadel_client/models/otp_email.py create mode 100644 zitadel_client/models/otp_sms.py create mode 100644 zitadel_client/models/password.py create mode 100644 zitadel_client/models/password1.py create mode 100644 zitadel_client/models/password2.py create mode 100644 zitadel_client/models/password3.py create mode 100644 zitadel_client/models/phone_query.py create mode 100644 zitadel_client/models/phone_query1.py create mode 100644 zitadel_client/models/post.py create mode 100644 zitadel_client/models/post_form.py create mode 100644 zitadel_client/models/redirect.py create mode 100644 zitadel_client/models/request.py create mode 100644 zitadel_client/models/response.py create mode 100644 zitadel_client/models/rest_async.py create mode 100644 zitadel_client/models/rest_call.py create mode 100644 zitadel_client/models/rest_webhook.py create mode 100644 zitadel_client/models/return_code.py create mode 100644 zitadel_client/models/return_code1.py create mode 100644 zitadel_client/models/return_code10.py create mode 100644 zitadel_client/models/return_code11.py create mode 100644 zitadel_client/models/return_code12.py create mode 100644 zitadel_client/models/return_code13.py create mode 100644 zitadel_client/models/return_code14.py create mode 100644 zitadel_client/models/return_code2.py create mode 100644 zitadel_client/models/return_code3.py create mode 100644 zitadel_client/models/return_code4.py create mode 100644 zitadel_client/models/return_code5.py create mode 100644 zitadel_client/models/return_code6.py create mode 100644 zitadel_client/models/return_code7.py create mode 100644 zitadel_client/models/return_code8.py create mode 100644 zitadel_client/models/return_code9.py create mode 100644 zitadel_client/models/rsa.py create mode 100644 zitadel_client/models/saml.py create mode 100644 zitadel_client/models/saml1.py create mode 100644 zitadel_client/models/saml2.py create mode 100644 zitadel_client/models/saml_service_any.py create mode 100644 zitadel_client/models/saml_service_connect_error.py create mode 100644 zitadel_client/models/saml_service_get_saml_request_request.py create mode 100644 zitadel_client/models/send_code.py create mode 100644 zitadel_client/models/send_code1.py create mode 100644 zitadel_client/models/send_code10.py create mode 100644 zitadel_client/models/send_code2.py create mode 100644 zitadel_client/models/send_code3.py create mode 100644 zitadel_client/models/send_code4.py create mode 100644 zitadel_client/models/send_code5.py create mode 100644 zitadel_client/models/send_code6.py create mode 100644 zitadel_client/models/send_code7.py create mode 100644 zitadel_client/models/send_code8.py create mode 100644 zitadel_client/models/send_code9.py create mode 100644 zitadel_client/models/send_link.py create mode 100644 zitadel_client/models/send_link1.py create mode 100644 zitadel_client/models/send_link2.py create mode 100644 zitadel_client/models/send_link3.py create mode 100644 zitadel_client/models/service.py create mode 100644 zitadel_client/models/session.py create mode 100644 zitadel_client/models/session1.py create mode 100644 zitadel_client/models/session2.py create mode 100644 zitadel_client/models/session_service_any.py create mode 100644 zitadel_client/models/session_service_connect_error.py rename zitadel_client/models/{action_service_beta_update_target_response.py => session_service_get_session_request.py} (74%) create mode 100644 zitadel_client/models/session_service_header_values.py create mode 100644 zitadel_client/models/session_service_otp_email.py delete mode 100644 zitadel_client/models/session_service_otp_email_send_code.py create mode 100644 zitadel_client/models/session_service_otpsms.py create mode 100644 zitadel_client/models/session_service_send_code.py create mode 100644 zitadel_client/models/session_service_value.py rename zitadel_client/models/{session_service_request_challenges_web_auth_n.py => session_service_web_auth_n.py} (80%) create mode 100644 zitadel_client/models/settings_service_any.py create mode 100644 zitadel_client/models/settings_service_connect_error.py create mode 100644 zitadel_client/models/settings_service_get_active_identity_providers_request.py create mode 100644 zitadel_client/models/settings_service_get_branding_settings_request.py create mode 100644 zitadel_client/models/settings_service_get_domain_settings_request.py create mode 100644 zitadel_client/models/settings_service_get_legal_and_support_settings_request.py create mode 100644 zitadel_client/models/settings_service_get_lockout_settings_request.py create mode 100644 zitadel_client/models/settings_service_get_login_settings_request.py create mode 100644 zitadel_client/models/settings_service_get_password_complexity_settings_request.py create mode 100644 zitadel_client/models/settings_service_get_password_expiry_settings_request.py create mode 100644 zitadel_client/models/settings_service_request_context.py create mode 100644 zitadel_client/models/state_query.py rename zitadel_client/models/{action_service_beta_delete_target_response.py => state_query1.py} (75%) create mode 100644 zitadel_client/models/state_query2.py create mode 100644 zitadel_client/models/target_filter.py rename zitadel_client/models/{session_service_request_challenges_otp_email.py => target_name_filter.py} (73%) create mode 100644 zitadel_client/models/tenant_id.py rename zitadel_client/models/{action_service_beta_set_execution_response.py => tenant_type.py} (81%) create mode 100644 zitadel_client/models/type_query.py create mode 100644 zitadel_client/models/type_query1.py create mode 100644 zitadel_client/models/u2f.py create mode 100644 zitadel_client/models/urls.py create mode 100644 zitadel_client/models/urls1.py create mode 100644 zitadel_client/models/user_agent_query.py create mode 100644 zitadel_client/models/user_id.py create mode 100644 zitadel_client/models/user_id_query.py create mode 100644 zitadel_client/models/user_id_query1.py create mode 100644 zitadel_client/models/user_name_query.py create mode 100644 zitadel_client/models/user_name_query1.py create mode 100644 zitadel_client/models/user_service_add_otp_email_request.py create mode 100644 zitadel_client/models/user_service_add_otpsms_request.py create mode 100644 zitadel_client/models/user_service_any.py create mode 100644 zitadel_client/models/user_service_auth_factors.py create mode 100644 zitadel_client/models/user_service_connect_error.py create mode 100644 zitadel_client/models/user_service_deactivate_user_request.py create mode 100644 zitadel_client/models/user_service_delete_user_request.py create mode 100644 zitadel_client/models/user_service_domain_query.py create mode 100644 zitadel_client/models/user_service_get_user_by_id_request.py create mode 100644 zitadel_client/models/user_service_human_mfa_init_skipped_request.py rename zitadel_client/models/{organization_service_add_organization_request_admin.py => user_service_list_authentication_factors_request.py} (75%) create mode 100644 zitadel_client/models/user_service_list_authentication_method_types_request.py create mode 100644 zitadel_client/models/user_service_list_passkeys_request.py rename zitadel_client/models/{settings_service_protobuf_any.py => user_service_lock_user_request.py} (86%) create mode 100644 zitadel_client/models/user_service_reactivate_user_request.py create mode 100644 zitadel_client/models/user_service_register_totp_request.py create mode 100644 zitadel_client/models/user_service_remove_idp_link_request.py create mode 100644 zitadel_client/models/user_service_remove_otp_email_request.py create mode 100644 zitadel_client/models/user_service_remove_otpsms_request.py create mode 100644 zitadel_client/models/user_service_remove_passkey_request.py create mode 100644 zitadel_client/models/user_service_remove_phone_request.py create mode 100644 zitadel_client/models/user_service_remove_totp_request.py create mode 100644 zitadel_client/models/user_service_remove_u2_f_request.py create mode 100644 zitadel_client/models/user_service_resend_invite_code_request.py delete mode 100644 zitadel_client/models/user_service_rpc_status.py create mode 100644 zitadel_client/models/user_service_unlock_user_request.py create mode 100644 zitadel_client/models/user_service_value.py rename zitadel_client/models/{user_service_protobuf_any.py => verification_code.py} (85%) delete mode 100644 zitadel_client/models/web_key_service_beta_web_key.py diff --git a/zitadel_client/api/__init__.py b/zitadel_client/api/__init__.py index c18ea9a0..ef3884f4 100644 --- a/zitadel_client/api/__init__.py +++ b/zitadel_client/api/__init__.py @@ -1,7 +1,14 @@ # flake8: noqa # import apis into api package -from zitadel_client.api.action_service_api import ActionServiceApi +from zitadel_client.api.beta_action_service_api import BetaActionServiceApi +from zitadel_client.api.beta_feature_service_api import BetaFeatureServiceApi +from zitadel_client.api.beta_oidc_service_api import BetaOIDCServiceApi +from zitadel_client.api.beta_organization_service_api import BetaOrganizationServiceApi +from zitadel_client.api.beta_session_service_api import BetaSessionServiceApi +from zitadel_client.api.beta_settings_service_api import BetaSettingsServiceApi +from zitadel_client.api.beta_user_service_api import BetaUserServiceApi +from zitadel_client.api.beta_web_key_service_api import BetaWebKeyServiceApi from zitadel_client.api.feature_service_api import FeatureServiceApi from zitadel_client.api.identity_provider_service_api import IdentityProviderServiceApi from zitadel_client.api.oidc_service_api import OIDCServiceApi @@ -10,5 +17,4 @@ from zitadel_client.api.session_service_api import SessionServiceApi from zitadel_client.api.settings_service_api import SettingsServiceApi from zitadel_client.api.user_service_api import UserServiceApi -from zitadel_client.api.web_key_service_api import WebKeyServiceApi diff --git a/zitadel_client/api/action_service_api.py b/zitadel_client/api/beta_action_service_api.py similarity index 70% rename from zitadel_client/api/action_service_api.py rename to zitadel_client/api/beta_action_service_api.py index 5afad3ab..a21ffdd1 100644 --- a/zitadel_client/api/action_service_api.py +++ b/zitadel_client/api/beta_action_service_api.py @@ -16,30 +16,32 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Optional -from typing_extensions import Annotated -from zitadel_client.models.action_service_beta_create_target_response import ActionServiceBetaCreateTargetResponse -from zitadel_client.models.action_service_beta_delete_target_response import ActionServiceBetaDeleteTargetResponse -from zitadel_client.models.action_service_beta_get_target_response import ActionServiceBetaGetTargetResponse -from zitadel_client.models.action_service_beta_list_execution_functions_response import ActionServiceBetaListExecutionFunctionsResponse -from zitadel_client.models.action_service_beta_list_execution_methods_response import ActionServiceBetaListExecutionMethodsResponse -from zitadel_client.models.action_service_beta_list_execution_services_response import ActionServiceBetaListExecutionServicesResponse -from zitadel_client.models.action_service_beta_list_executions_response import ActionServiceBetaListExecutionsResponse -from zitadel_client.models.action_service_beta_list_targets_response import ActionServiceBetaListTargetsResponse -from zitadel_client.models.action_service_beta_set_execution_response import ActionServiceBetaSetExecutionResponse -from zitadel_client.models.action_service_beta_update_target_response import ActionServiceBetaUpdateTargetResponse -from zitadel_client.models.action_service_create_target_request import ActionServiceCreateTargetRequest -from zitadel_client.models.action_service_list_targets_request import ActionServiceListTargetsRequest -from zitadel_client.models.action_service_set_execution_request import ActionServiceSetExecutionRequest -from zitadel_client.models.action_service_update_target_request import ActionServiceUpdateTargetRequest +from typing import Any, Dict +from zitadel_client.models.beta_action_service_create_target_request import BetaActionServiceCreateTargetRequest +from zitadel_client.models.beta_action_service_create_target_response import BetaActionServiceCreateTargetResponse +from zitadel_client.models.beta_action_service_delete_target_request import BetaActionServiceDeleteTargetRequest +from zitadel_client.models.beta_action_service_delete_target_response import BetaActionServiceDeleteTargetResponse +from zitadel_client.models.beta_action_service_get_target_request import BetaActionServiceGetTargetRequest +from zitadel_client.models.beta_action_service_get_target_response import BetaActionServiceGetTargetResponse +from zitadel_client.models.beta_action_service_list_execution_functions_response import BetaActionServiceListExecutionFunctionsResponse +from zitadel_client.models.beta_action_service_list_execution_methods_response import BetaActionServiceListExecutionMethodsResponse +from zitadel_client.models.beta_action_service_list_execution_services_response import BetaActionServiceListExecutionServicesResponse +from zitadel_client.models.beta_action_service_list_executions_request import BetaActionServiceListExecutionsRequest +from zitadel_client.models.beta_action_service_list_executions_response import BetaActionServiceListExecutionsResponse +from zitadel_client.models.beta_action_service_list_targets_request import BetaActionServiceListTargetsRequest +from zitadel_client.models.beta_action_service_list_targets_response import BetaActionServiceListTargetsResponse +from zitadel_client.models.beta_action_service_set_execution_request import BetaActionServiceSetExecutionRequest +from zitadel_client.models.beta_action_service_set_execution_response import BetaActionServiceSetExecutionResponse +from zitadel_client.models.beta_action_service_update_target_request import BetaActionServiceUpdateTargetRequest +from zitadel_client.models.beta_action_service_update_target_response import BetaActionServiceUpdateTargetResponse +from zitadel_client.models.no_op200_response8 import NoOp200Response8 from zitadel_client.api_client import ApiClient, RequestSerialized from zitadel_client.api_response import ApiResponse from zitadel_client.rest import RESTResponseType -class ActionServiceApi: +class BetaActionServiceApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -53,9 +55,9 @@ def __init__(self, api_client=None) -> None: @validate_call - def action_service_create_target( + def create_target( self, - action_service_create_target_request: ActionServiceCreateTargetRequest, + beta_action_service_create_target_request: BetaActionServiceCreateTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -68,13 +70,13 @@ def action_service_create_target( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ActionServiceBetaCreateTargetResponse: - """Create Target + ) -> BetaActionServiceCreateTargetResponse: + """CreateTarget - Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` + Create Target Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` - :param action_service_create_target_request: (required) - :type action_service_create_target_request: ActionServiceCreateTargetRequest + :param beta_action_service_create_target_request: (required) + :type beta_action_service_create_target_request: BetaActionServiceCreateTargetRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -97,8 +99,8 @@ def action_service_create_target( :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._create_target_serialize( + beta_action_service_create_target_request=beta_action_service_create_target_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -106,11 +108,7 @@ def action_service_create_target( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaCreateTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - '409': "object", + '200': "BetaActionServiceCreateTargetResponse", } response_data = self.api_client.call_api( *_param, @@ -124,9 +122,9 @@ def action_service_create_target( @validate_call - def action_service_create_target_with_http_info( + def create_target_with_http_info( self, - action_service_create_target_request: ActionServiceCreateTargetRequest, + beta_action_service_create_target_request: BetaActionServiceCreateTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -139,13 +137,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 + ) -> ApiResponse[BetaActionServiceCreateTargetResponse]: + """CreateTarget - Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` + Create Target Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` - :param action_service_create_target_request: (required) - :type action_service_create_target_request: ActionServiceCreateTargetRequest + :param beta_action_service_create_target_request: (required) + :type beta_action_service_create_target_request: BetaActionServiceCreateTargetRequest :param _request_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 +166,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._create_target_serialize( + beta_action_service_create_target_request=beta_action_service_create_target_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -177,11 +175,7 @@ def action_service_create_target_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaCreateTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - '409': "object", + '200': "BetaActionServiceCreateTargetResponse", } response_data = self.api_client.call_api( *_param, @@ -195,9 +189,9 @@ def action_service_create_target_with_http_info( @validate_call - def action_service_create_target_without_preload_content( + def create_target_without_preload_content( self, - action_service_create_target_request: ActionServiceCreateTargetRequest, + beta_action_service_create_target_request: BetaActionServiceCreateTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -211,12 +205,12 @@ def action_service_create_target_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Target + """CreateTarget - Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` + Create Target Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` - :param action_service_create_target_request: (required) - :type action_service_create_target_request: ActionServiceCreateTargetRequest + :param beta_action_service_create_target_request: (required) + :type beta_action_service_create_target_request: BetaActionServiceCreateTargetRequest :param _request_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 +233,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._create_target_serialize( + beta_action_service_create_target_request=beta_action_service_create_target_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -248,11 +242,7 @@ def action_service_create_target_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaCreateTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - '409': "object", + '200': "BetaActionServiceCreateTargetResponse", } response_data = self.api_client.call_api( *_param, @@ -261,9 +251,9 @@ def action_service_create_target_without_preload_content( return response_data.response - def _action_service_create_target_serialize( + def _create_target_serialize( self, - action_service_create_target_request, + beta_action_service_create_target_request, _request_auth, _content_type, _headers, @@ -289,8 +279,8 @@ def _action_service_create_target_serialize( # 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 + if beta_action_service_create_target_request is not None: + _body_params = beta_action_service_create_target_request # set the HTTP header `Accept` @@ -322,7 +312,7 @@ def _action_service_create_target_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2beta/actions/targets', + resource_path='/zitadel.action.v2beta.ActionService/CreateTarget', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -339,9 +329,9 @@ def _action_service_create_target_serialize( @validate_call - def action_service_delete_target( + def delete_target( self, - id: StrictStr, + beta_action_service_delete_target_request: BetaActionServiceDeleteTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -354,13 +344,13 @@ 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 + ) -> BetaActionServiceDeleteTargetResponse: + """DeleteTarget - 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` + Delete Target Delete an existing target. This will remove it from any configured execution as well. In case the target is not found, the request will return a successful response as the desired state is already achieved. Required permission: - `action.target.delete` Required feature flag: - `actions` - :param id: (required) - :type id: str + :param beta_action_service_delete_target_request: (required) + :type beta_action_service_delete_target_request: BetaActionServiceDeleteTargetRequest :param _request_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 +373,8 @@ def action_service_delete_target( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_delete_target_serialize( - id=id, + _param = self._delete_target_serialize( + beta_action_service_delete_target_request=beta_action_service_delete_target_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -392,10 +382,7 @@ def action_service_delete_target( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaDeleteTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceDeleteTargetResponse", } response_data = self.api_client.call_api( *_param, @@ -409,9 +396,9 @@ def action_service_delete_target( @validate_call - def action_service_delete_target_with_http_info( + def delete_target_with_http_info( self, - id: StrictStr, + beta_action_service_delete_target_request: BetaActionServiceDeleteTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -424,13 +411,13 @@ def action_service_delete_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[ActionServiceBetaDeleteTargetResponse]: - """Delete Target + ) -> ApiResponse[BetaActionServiceDeleteTargetResponse]: + """DeleteTarget - 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` + Delete Target Delete an existing target. This will remove it from any configured execution as well. In case the target is not found, the request will return a successful response as the desired state is already achieved. Required permission: - `action.target.delete` Required feature flag: - `actions` - :param id: (required) - :type id: str + :param beta_action_service_delete_target_request: (required) + :type beta_action_service_delete_target_request: BetaActionServiceDeleteTargetRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -453,8 +440,8 @@ def action_service_delete_target_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_delete_target_serialize( - id=id, + _param = self._delete_target_serialize( + beta_action_service_delete_target_request=beta_action_service_delete_target_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -462,10 +449,7 @@ def action_service_delete_target_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaDeleteTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceDeleteTargetResponse", } response_data = self.api_client.call_api( *_param, @@ -479,9 +463,9 @@ def action_service_delete_target_with_http_info( @validate_call - def action_service_delete_target_without_preload_content( + def delete_target_without_preload_content( self, - id: StrictStr, + beta_action_service_delete_target_request: BetaActionServiceDeleteTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -495,12 +479,12 @@ def action_service_delete_target_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Target + """DeleteTarget - 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` + Delete Target Delete an existing target. This will remove it from any configured execution as well. In case the target is not found, the request will return a successful response as the desired state is already achieved. Required permission: - `action.target.delete` Required feature flag: - `actions` - :param id: (required) - :type id: str + :param beta_action_service_delete_target_request: (required) + :type beta_action_service_delete_target_request: BetaActionServiceDeleteTargetRequest :param _request_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 +507,8 @@ 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._delete_target_serialize( + beta_action_service_delete_target_request=beta_action_service_delete_target_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -532,10 +516,7 @@ def action_service_delete_target_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaDeleteTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceDeleteTargetResponse", } response_data = self.api_client.call_api( *_param, @@ -544,9 +525,9 @@ def action_service_delete_target_without_preload_content( return response_data.response - def _action_service_delete_target_serialize( + def _delete_target_serialize( self, - id, + beta_action_service_delete_target_request, _request_auth, _content_type, _headers, @@ -568,12 +549,12 @@ 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 # process the body parameter + if beta_action_service_delete_target_request is not None: + _body_params = beta_action_service_delete_target_request # set the HTTP header `Accept` @@ -584,6 +565,19 @@ def _action_service_delete_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] = [ @@ -591,8 +585,8 @@ def _action_service_delete_target_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2beta/actions/targets/{id}', + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/DeleteTarget', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -609,9 +603,9 @@ def _action_service_delete_target_serialize( @validate_call - def action_service_get_target( + def get_target( self, - id: StrictStr, + beta_action_service_get_target_request: BetaActionServiceGetTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -624,13 +618,13 @@ 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 + ) -> BetaActionServiceGetTargetResponse: + """GetTarget - Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + Get Target Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` - :param id: (required) - :type id: str + :param beta_action_service_get_target_request: (required) + :type beta_action_service_get_target_request: BetaActionServiceGetTargetRequest :param _request_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 +647,8 @@ def action_service_get_target( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_get_target_serialize( - id=id, + _param = self._get_target_serialize( + beta_action_service_get_target_request=beta_action_service_get_target_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -662,10 +656,7 @@ def action_service_get_target( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaGetTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "object", + '200': "BetaActionServiceGetTargetResponse", } response_data = self.api_client.call_api( *_param, @@ -679,9 +670,9 @@ def action_service_get_target( @validate_call - def action_service_get_target_with_http_info( + def get_target_with_http_info( self, - id: StrictStr, + beta_action_service_get_target_request: BetaActionServiceGetTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -694,13 +685,13 @@ 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 + ) -> ApiResponse[BetaActionServiceGetTargetResponse]: + """GetTarget - Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + Get Target Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` - :param id: (required) - :type id: str + :param beta_action_service_get_target_request: (required) + :type beta_action_service_get_target_request: BetaActionServiceGetTargetRequest :param _request_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 +714,8 @@ 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._get_target_serialize( + beta_action_service_get_target_request=beta_action_service_get_target_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -732,10 +723,7 @@ def action_service_get_target_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaGetTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "object", + '200': "BetaActionServiceGetTargetResponse", } response_data = self.api_client.call_api( *_param, @@ -749,9 +737,9 @@ def action_service_get_target_with_http_info( @validate_call - def action_service_get_target_without_preload_content( + def get_target_without_preload_content( self, - id: StrictStr, + beta_action_service_get_target_request: BetaActionServiceGetTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -765,12 +753,12 @@ def action_service_get_target_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Target + """GetTarget - Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + Get Target Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` - :param id: (required) - :type id: str + :param beta_action_service_get_target_request: (required) + :type beta_action_service_get_target_request: BetaActionServiceGetTargetRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -793,8 +781,8 @@ def action_service_get_target_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_get_target_serialize( - id=id, + _param = self._get_target_serialize( + beta_action_service_get_target_request=beta_action_service_get_target_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -802,10 +790,7 @@ def action_service_get_target_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaGetTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "object", + '200': "BetaActionServiceGetTargetResponse", } response_data = self.api_client.call_api( *_param, @@ -814,9 +799,9 @@ def action_service_get_target_without_preload_content( return response_data.response - def _action_service_get_target_serialize( + def _get_target_serialize( self, - id, + beta_action_service_get_target_request, _request_auth, _content_type, _headers, @@ -838,12 +823,12 @@ def _action_service_get_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 beta_action_service_get_target_request is not None: + _body_params = beta_action_service_get_target_request # set the HTTP header `Accept` @@ -854,6 +839,19 @@ def _action_service_get_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] = [ @@ -861,8 +859,8 @@ def _action_service_get_target_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2beta/actions/targets/{id}', + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/GetTarget', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -879,8 +877,9 @@ def _action_service_get_target_serialize( @validate_call - def action_service_list_execution_functions( + def list_execution_functions( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -893,11 +892,13 @@ def action_service_list_execution_functions( _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 + ) -> BetaActionServiceListExecutionFunctionsResponse: + """ListExecutionFunctions - List all available functions which can be used as condition for executions. + List Execution Functions List all available functions which can be used as condition for executions. + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -920,7 +921,8 @@ def action_service_list_execution_functions( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_list_execution_functions_serialize( + _param = self._list_execution_functions_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -928,9 +930,7 @@ def action_service_list_execution_functions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionFunctionsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListExecutionFunctionsResponse", } response_data = self.api_client.call_api( *_param, @@ -944,8 +944,9 @@ def action_service_list_execution_functions( @validate_call - def action_service_list_execution_functions_with_http_info( + def list_execution_functions_with_http_info( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -958,11 +959,13 @@ def action_service_list_execution_functions_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[ActionServiceBetaListExecutionFunctionsResponse]: - """List Execution Functions + ) -> ApiResponse[BetaActionServiceListExecutionFunctionsResponse]: + """ListExecutionFunctions - List all available functions which can be used as condition for executions. + List Execution Functions List all available functions which can be used as condition for executions. + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -985,7 +988,8 @@ def action_service_list_execution_functions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_list_execution_functions_serialize( + _param = self._list_execution_functions_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -993,9 +997,7 @@ def action_service_list_execution_functions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionFunctionsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListExecutionFunctionsResponse", } response_data = self.api_client.call_api( *_param, @@ -1009,8 +1011,9 @@ def action_service_list_execution_functions_with_http_info( @validate_call - def action_service_list_execution_functions_without_preload_content( + def list_execution_functions_without_preload_content( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1024,10 +1027,12 @@ def action_service_list_execution_functions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Execution Functions + """ListExecutionFunctions - List all available functions which can be used as condition for executions. + List Execution Functions List all available functions which can be used as condition for executions. + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1050,7 +1055,8 @@ def action_service_list_execution_functions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_list_execution_functions_serialize( + _param = self._list_execution_functions_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1058,9 +1064,7 @@ def action_service_list_execution_functions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionFunctionsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListExecutionFunctionsResponse", } response_data = self.api_client.call_api( *_param, @@ -1069,8 +1073,9 @@ def action_service_list_execution_functions_without_preload_content( return response_data.response - def _action_service_list_execution_functions_serialize( + def _list_execution_functions_serialize( self, + body, _request_auth, _content_type, _headers, @@ -1096,6 +1101,8 @@ def _action_service_list_execution_functions_serialize( # process the header parameters # process the form parameters # process the body parameter + if body is not None: + _body_params = body # set the HTTP header `Accept` @@ -1106,6 +1113,19 @@ def _action_service_list_execution_functions_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] = [ @@ -1113,8 +1133,8 @@ def _action_service_list_execution_functions_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2beta/actions/executions/functions', + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/ListExecutionFunctions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1131,8 +1151,9 @@ def _action_service_list_execution_functions_serialize( @validate_call - def action_service_list_execution_methods( + def list_execution_methods( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1145,11 +1166,13 @@ def action_service_list_execution_methods( _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 + ) -> BetaActionServiceListExecutionMethodsResponse: + """ListExecutionMethods - List all available methods which can be used as condition for executions. + List Execution Methods List all available methods which can be used as condition for executions. + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1172,7 +1195,8 @@ def action_service_list_execution_methods( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_list_execution_methods_serialize( + _param = self._list_execution_methods_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1180,9 +1204,7 @@ def action_service_list_execution_methods( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionMethodsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListExecutionMethodsResponse", } response_data = self.api_client.call_api( *_param, @@ -1196,8 +1218,9 @@ def action_service_list_execution_methods( @validate_call - def action_service_list_execution_methods_with_http_info( + def list_execution_methods_with_http_info( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1210,11 +1233,13 @@ def action_service_list_execution_methods_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[ActionServiceBetaListExecutionMethodsResponse]: - """List Execution Methods + ) -> ApiResponse[BetaActionServiceListExecutionMethodsResponse]: + """ListExecutionMethods - List all available methods which can be used as condition for executions. + List Execution Methods List all available methods which can be used as condition for executions. + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1237,7 +1262,8 @@ def action_service_list_execution_methods_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_list_execution_methods_serialize( + _param = self._list_execution_methods_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1245,9 +1271,7 @@ def action_service_list_execution_methods_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionMethodsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListExecutionMethodsResponse", } response_data = self.api_client.call_api( *_param, @@ -1261,8 +1285,9 @@ def action_service_list_execution_methods_with_http_info( @validate_call - def action_service_list_execution_methods_without_preload_content( + def list_execution_methods_without_preload_content( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1276,10 +1301,12 @@ def action_service_list_execution_methods_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Execution Methods + """ListExecutionMethods - List all available methods which can be used as condition for executions. + List Execution Methods List all available methods which can be used as condition for executions. + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1302,7 +1329,8 @@ def action_service_list_execution_methods_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_list_execution_methods_serialize( + _param = self._list_execution_methods_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1310,9 +1338,7 @@ def action_service_list_execution_methods_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionMethodsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListExecutionMethodsResponse", } response_data = self.api_client.call_api( *_param, @@ -1321,8 +1347,9 @@ def action_service_list_execution_methods_without_preload_content( return response_data.response - def _action_service_list_execution_methods_serialize( + def _list_execution_methods_serialize( self, + body, _request_auth, _content_type, _headers, @@ -1348,6 +1375,8 @@ def _action_service_list_execution_methods_serialize( # process the header parameters # process the form parameters # process the body parameter + if body is not None: + _body_params = body # set the HTTP header `Accept` @@ -1358,6 +1387,19 @@ def _action_service_list_execution_methods_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] = [ @@ -1365,8 +1407,8 @@ def _action_service_list_execution_methods_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2beta/actions/executions/methods', + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/ListExecutionMethods', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1383,8 +1425,9 @@ def _action_service_list_execution_methods_serialize( @validate_call - def action_service_list_execution_services( + def list_execution_services( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1397,11 +1440,13 @@ def action_service_list_execution_services( _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 + ) -> BetaActionServiceListExecutionServicesResponse: + """ListExecutionServices - List all available services which can be used as condition for executions. + List Execution Services List all available services which can be used as condition for executions. + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1424,7 +1469,8 @@ def action_service_list_execution_services( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_list_execution_services_serialize( + _param = self._list_execution_services_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1432,9 +1478,7 @@ def action_service_list_execution_services( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionServicesResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListExecutionServicesResponse", } response_data = self.api_client.call_api( *_param, @@ -1448,8 +1492,9 @@ def action_service_list_execution_services( @validate_call - def action_service_list_execution_services_with_http_info( + def list_execution_services_with_http_info( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1462,11 +1507,13 @@ def action_service_list_execution_services_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[ActionServiceBetaListExecutionServicesResponse]: - """List Execution Services + ) -> ApiResponse[BetaActionServiceListExecutionServicesResponse]: + """ListExecutionServices - List all available services which can be used as condition for executions. + List Execution Services List all available services which can be used as condition for executions. + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1489,7 +1536,8 @@ def action_service_list_execution_services_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_list_execution_services_serialize( + _param = self._list_execution_services_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1497,9 +1545,7 @@ def action_service_list_execution_services_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionServicesResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListExecutionServicesResponse", } response_data = self.api_client.call_api( *_param, @@ -1513,8 +1559,9 @@ def action_service_list_execution_services_with_http_info( @validate_call - def action_service_list_execution_services_without_preload_content( + def list_execution_services_without_preload_content( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1528,10 +1575,12 @@ def action_service_list_execution_services_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Execution Services + """ListExecutionServices - List all available services which can be used as condition for executions. + List Execution Services List all available services which can be used as condition for executions. + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1554,7 +1603,8 @@ def action_service_list_execution_services_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_list_execution_services_serialize( + _param = self._list_execution_services_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1562,9 +1612,7 @@ def action_service_list_execution_services_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionServicesResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListExecutionServicesResponse", } response_data = self.api_client.call_api( *_param, @@ -1573,8 +1621,9 @@ def action_service_list_execution_services_without_preload_content( return response_data.response - def _action_service_list_execution_services_serialize( + def _list_execution_services_serialize( self, + body, _request_auth, _content_type, _headers, @@ -1600,6 +1649,8 @@ def _action_service_list_execution_services_serialize( # process the header parameters # process the form parameters # process the body parameter + if body is not None: + _body_params = body # set the HTTP header `Accept` @@ -1610,6 +1661,19 @@ def _action_service_list_execution_services_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] = [ @@ -1617,8 +1681,8 @@ def _action_service_list_execution_services_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2beta/actions/executions/services', + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/ListExecutionServices', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1635,12 +1699,9 @@ def _action_service_list_execution_services_serialize( @validate_call - def action_service_list_executions( + def 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, + beta_action_service_list_executions_request: BetaActionServiceListExecutionsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1653,19 +1714,13 @@ def action_service_list_executions( _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 + ) -> BetaActionServiceListExecutionsResponse: + """ListExecutions + + List Executions List all matching executions. By default all executions of the instance are returned that have at least one execution target. Make sure to include a limit and sorting for pagination. Required permission: - `action.execution.read` Required feature flag: - `actions` + + :param beta_action_service_list_executions_request: (required) + :type beta_action_service_list_executions_request: BetaActionServiceListExecutionsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1688,11 +1743,8 @@ def action_service_list_executions( :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, + _param = self._list_executions_serialize( + beta_action_service_list_executions_request=beta_action_service_list_executions_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1700,10 +1752,7 @@ def action_service_list_executions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListExecutionsResponse", } response_data = self.api_client.call_api( *_param, @@ -1717,12 +1766,9 @@ def action_service_list_executions( @validate_call - def action_service_list_executions_with_http_info( + def 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, + beta_action_service_list_executions_request: BetaActionServiceListExecutionsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1735,19 +1781,13 @@ def action_service_list_executions_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[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 + ) -> ApiResponse[BetaActionServiceListExecutionsResponse]: + """ListExecutions + + List Executions List all matching executions. By default all executions of the instance are returned that have at least one execution target. Make sure to include a limit and sorting for pagination. Required permission: - `action.execution.read` Required feature flag: - `actions` + + :param beta_action_service_list_executions_request: (required) + :type beta_action_service_list_executions_request: BetaActionServiceListExecutionsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1770,11 +1810,8 @@ def action_service_list_executions_with_http_info( :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, + _param = self._list_executions_serialize( + beta_action_service_list_executions_request=beta_action_service_list_executions_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1782,10 +1819,7 @@ def action_service_list_executions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListExecutionsResponse", } response_data = self.api_client.call_api( *_param, @@ -1799,12 +1833,9 @@ def action_service_list_executions_with_http_info( @validate_call - def action_service_list_executions_without_preload_content( + def 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, + beta_action_service_list_executions_request: BetaActionServiceListExecutionsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1818,18 +1849,12 @@ def action_service_list_executions_without_preload_content( _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 + """ListExecutions + + List Executions List all matching executions. By default all executions of the instance are returned that have at least one execution target. Make sure to include a limit and sorting for pagination. Required permission: - `action.execution.read` Required feature flag: - `actions` + + :param beta_action_service_list_executions_request: (required) + :type beta_action_service_list_executions_request: BetaActionServiceListExecutionsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1852,11 +1877,8 @@ def action_service_list_executions_without_preload_content( :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, + _param = self._list_executions_serialize( + beta_action_service_list_executions_request=beta_action_service_list_executions_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1864,10 +1886,7 @@ def action_service_list_executions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListExecutionsResponse", } response_data = self.api_client.call_api( *_param, @@ -1876,12 +1895,9 @@ def action_service_list_executions_without_preload_content( return response_data.response - def _action_service_list_executions_serialize( + def _list_executions_serialize( self, - pagination_offset, - pagination_limit, - pagination_asc, - sorting_column, + beta_action_service_list_executions_request, _request_auth, _content_type, _headers, @@ -1904,25 +1920,11 @@ def _action_service_list_executions_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 beta_action_service_list_executions_request is not None: + _body_params = beta_action_service_list_executions_request # set the HTTP header `Accept` @@ -1933,6 +1935,19 @@ def _action_service_list_executions_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] = [ @@ -1941,7 +1956,7 @@ def _action_service_list_executions_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2beta/actions/executions/_search', + resource_path='/zitadel.action.v2beta.ActionService/ListExecutions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1958,9 +1973,9 @@ def _action_service_list_executions_serialize( @validate_call - def action_service_list_targets( + def list_targets( self, - action_service_list_targets_request: ActionServiceListTargetsRequest, + beta_action_service_list_targets_request: BetaActionServiceListTargetsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1973,13 +1988,13 @@ def action_service_list_targets( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ActionServiceBetaListTargetsResponse: - """List targets + ) -> BetaActionServiceListTargetsResponse: + """ListTargets - 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` + 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 beta_action_service_list_targets_request: (required) + :type beta_action_service_list_targets_request: BetaActionServiceListTargetsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2002,8 +2017,8 @@ def action_service_list_targets( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_list_targets_serialize( - action_service_list_targets_request=action_service_list_targets_request, + _param = self._list_targets_serialize( + beta_action_service_list_targets_request=beta_action_service_list_targets_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2011,10 +2026,7 @@ def action_service_list_targets( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListTargetsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListTargetsResponse", } response_data = self.api_client.call_api( *_param, @@ -2028,9 +2040,9 @@ def action_service_list_targets( @validate_call - def action_service_list_targets_with_http_info( + def list_targets_with_http_info( self, - action_service_list_targets_request: ActionServiceListTargetsRequest, + beta_action_service_list_targets_request: BetaActionServiceListTargetsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2043,13 +2055,13 @@ def action_service_list_targets_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[ActionServiceBetaListTargetsResponse]: - """List targets + ) -> ApiResponse[BetaActionServiceListTargetsResponse]: + """ListTargets - 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` + 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 beta_action_service_list_targets_request: (required) + :type beta_action_service_list_targets_request: BetaActionServiceListTargetsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2072,8 +2084,8 @@ def action_service_list_targets_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_list_targets_serialize( - action_service_list_targets_request=action_service_list_targets_request, + _param = self._list_targets_serialize( + beta_action_service_list_targets_request=beta_action_service_list_targets_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2081,10 +2093,7 @@ def action_service_list_targets_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListTargetsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListTargetsResponse", } response_data = self.api_client.call_api( *_param, @@ -2098,9 +2107,9 @@ def action_service_list_targets_with_http_info( @validate_call - def action_service_list_targets_without_preload_content( + def list_targets_without_preload_content( self, - action_service_list_targets_request: ActionServiceListTargetsRequest, + beta_action_service_list_targets_request: BetaActionServiceListTargetsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2114,12 +2123,12 @@ def action_service_list_targets_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List targets + """ListTargets - 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` + 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 beta_action_service_list_targets_request: (required) + :type beta_action_service_list_targets_request: BetaActionServiceListTargetsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2142,8 +2151,8 @@ def action_service_list_targets_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_list_targets_serialize( - action_service_list_targets_request=action_service_list_targets_request, + _param = self._list_targets_serialize( + beta_action_service_list_targets_request=beta_action_service_list_targets_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2151,10 +2160,7 @@ def action_service_list_targets_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListTargetsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceListTargetsResponse", } response_data = self.api_client.call_api( *_param, @@ -2163,9 +2169,9 @@ def action_service_list_targets_without_preload_content( return response_data.response - def _action_service_list_targets_serialize( + def _list_targets_serialize( self, - action_service_list_targets_request, + beta_action_service_list_targets_request, _request_auth, _content_type, _headers, @@ -2191,8 +2197,8 @@ def _action_service_list_targets_serialize( # 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 + if beta_action_service_list_targets_request is not None: + _body_params = beta_action_service_list_targets_request # set the HTTP header `Accept` @@ -2224,7 +2230,250 @@ def _action_service_list_targets_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2beta/actions/targets/_search', + resource_path='/zitadel.action.v2beta.ActionService/ListTargets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def no_op( + 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, + ) -> NoOp200Response8: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response8", + } + 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 no_op_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[NoOp200Response8]: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response8", + } + 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 no_op_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: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response8", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _no_op_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='/259ac2cb', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2241,9 +2490,9 @@ def _action_service_list_targets_serialize( @validate_call - def action_service_set_execution( + def set_execution( self, - action_service_set_execution_request: ActionServiceSetExecutionRequest, + beta_action_service_set_execution_request: BetaActionServiceSetExecutionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2256,13 +2505,13 @@ def action_service_set_execution( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ActionServiceBetaSetExecutionResponse: - """Set Execution + ) -> BetaActionServiceSetExecutionResponse: + """SetExecution - 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` + 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 beta_action_service_set_execution_request: (required) + :type beta_action_service_set_execution_request: BetaActionServiceSetExecutionRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2285,8 +2534,8 @@ def action_service_set_execution( :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._set_execution_serialize( + beta_action_service_set_execution_request=beta_action_service_set_execution_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2294,10 +2543,7 @@ def action_service_set_execution( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaSetExecutionResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceSetExecutionResponse", } response_data = self.api_client.call_api( *_param, @@ -2311,9 +2557,9 @@ def action_service_set_execution( @validate_call - def action_service_set_execution_with_http_info( + def set_execution_with_http_info( self, - action_service_set_execution_request: ActionServiceSetExecutionRequest, + beta_action_service_set_execution_request: BetaActionServiceSetExecutionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2326,13 +2572,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 + ) -> ApiResponse[BetaActionServiceSetExecutionResponse]: + """SetExecution - 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` + 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 beta_action_service_set_execution_request: (required) + :type beta_action_service_set_execution_request: BetaActionServiceSetExecutionRequest :param _request_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 +2601,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._set_execution_serialize( + beta_action_service_set_execution_request=beta_action_service_set_execution_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2364,10 +2610,7 @@ def action_service_set_execution_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaSetExecutionResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceSetExecutionResponse", } response_data = self.api_client.call_api( *_param, @@ -2381,9 +2624,9 @@ def action_service_set_execution_with_http_info( @validate_call - def action_service_set_execution_without_preload_content( + def set_execution_without_preload_content( self, - action_service_set_execution_request: ActionServiceSetExecutionRequest, + beta_action_service_set_execution_request: BetaActionServiceSetExecutionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2397,12 +2640,12 @@ def action_service_set_execution_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Set Execution + """SetExecution - 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` + 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 beta_action_service_set_execution_request: (required) + :type beta_action_service_set_execution_request: BetaActionServiceSetExecutionRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2425,8 +2668,8 @@ def action_service_set_execution_without_preload_content( :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._set_execution_serialize( + beta_action_service_set_execution_request=beta_action_service_set_execution_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2434,10 +2677,7 @@ def action_service_set_execution_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaSetExecutionResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", + '200': "BetaActionServiceSetExecutionResponse", } response_data = self.api_client.call_api( *_param, @@ -2446,9 +2686,9 @@ def action_service_set_execution_without_preload_content( return response_data.response - def _action_service_set_execution_serialize( + def _set_execution_serialize( self, - action_service_set_execution_request, + beta_action_service_set_execution_request, _request_auth, _content_type, _headers, @@ -2474,8 +2714,8 @@ def _action_service_set_execution_serialize( # process the header parameters # process the form parameters # process the body parameter - if action_service_set_execution_request is not None: - _body_params = action_service_set_execution_request + if beta_action_service_set_execution_request is not None: + _body_params = beta_action_service_set_execution_request # set the HTTP header `Accept` @@ -2506,8 +2746,8 @@ def _action_service_set_execution_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2beta/actions/executions', + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/SetExecution', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2524,10 +2764,9 @@ def _action_service_set_execution_serialize( @validate_call - def action_service_update_target( + def update_target( self, - id: StrictStr, - action_service_update_target_request: ActionServiceUpdateTargetRequest, + beta_action_service_update_target_request: BetaActionServiceUpdateTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2540,15 +2779,13 @@ def action_service_update_target( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ActionServiceBetaUpdateTargetResponse: - """Update Target + ) -> BetaActionServiceUpdateTargetResponse: + """UpdateTarget - Update an existing target. To generate a new signing key set the optional expirationSigningKey. Required permission: - `action.target.write` Required feature flag: - `actions` + 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 beta_action_service_update_target_request: (required) + :type beta_action_service_update_target_request: BetaActionServiceUpdateTargetRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2571,9 +2808,8 @@ def action_service_update_target( :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, + _param = self._update_target_serialize( + beta_action_service_update_target_request=beta_action_service_update_target_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2581,10 +2817,7 @@ def action_service_update_target( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaUpdateTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "object", + '200': "BetaActionServiceUpdateTargetResponse", } response_data = self.api_client.call_api( *_param, @@ -2598,10 +2831,9 @@ def action_service_update_target( @validate_call - def action_service_update_target_with_http_info( + def update_target_with_http_info( self, - id: StrictStr, - action_service_update_target_request: ActionServiceUpdateTargetRequest, + beta_action_service_update_target_request: BetaActionServiceUpdateTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2614,15 +2846,13 @@ def action_service_update_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[ActionServiceBetaUpdateTargetResponse]: - """Update Target + ) -> ApiResponse[BetaActionServiceUpdateTargetResponse]: + """UpdateTarget - Update an existing target. To generate a new signing key set the optional expirationSigningKey. Required permission: - `action.target.write` Required feature flag: - `actions` + 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 beta_action_service_update_target_request: (required) + :type beta_action_service_update_target_request: BetaActionServiceUpdateTargetRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2645,9 +2875,8 @@ def action_service_update_target_with_http_info( :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, + _param = self._update_target_serialize( + beta_action_service_update_target_request=beta_action_service_update_target_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2655,10 +2884,7 @@ def action_service_update_target_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaUpdateTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "object", + '200': "BetaActionServiceUpdateTargetResponse", } response_data = self.api_client.call_api( *_param, @@ -2672,10 +2898,9 @@ def action_service_update_target_with_http_info( @validate_call - def action_service_update_target_without_preload_content( + def update_target_without_preload_content( self, - id: StrictStr, - action_service_update_target_request: ActionServiceUpdateTargetRequest, + beta_action_service_update_target_request: BetaActionServiceUpdateTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2689,14 +2914,12 @@ def action_service_update_target_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Target + """UpdateTarget - Update an existing target. To generate a new signing key set the optional expirationSigningKey. Required permission: - `action.target.write` Required feature flag: - `actions` + 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 beta_action_service_update_target_request: (required) + :type beta_action_service_update_target_request: BetaActionServiceUpdateTargetRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2719,9 +2942,8 @@ def action_service_update_target_without_preload_content( :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, + _param = self._update_target_serialize( + beta_action_service_update_target_request=beta_action_service_update_target_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2729,10 +2951,7 @@ def action_service_update_target_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaUpdateTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "object", + '200': "BetaActionServiceUpdateTargetResponse", } response_data = self.api_client.call_api( *_param, @@ -2741,10 +2960,9 @@ def action_service_update_target_without_preload_content( return response_data.response - def _action_service_update_target_serialize( + def _update_target_serialize( self, - id, - action_service_update_target_request, + beta_action_service_update_target_request, _request_auth, _content_type, _headers, @@ -2766,14 +2984,12 @@ def _action_service_update_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_update_target_request is not None: - _body_params = action_service_update_target_request + if beta_action_service_update_target_request is not None: + _body_params = beta_action_service_update_target_request # set the HTTP header `Accept` @@ -2805,7 +3021,7 @@ def _action_service_update_target_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2beta/actions/targets/{id}', + resource_path='/zitadel.action.v2beta.ActionService/UpdateTarget', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/beta_feature_service_api.py b/zitadel_client/api/beta_feature_service_api.py new file mode 100644 index 00000000..aa162745 --- /dev/null +++ b/zitadel_client/api/beta_feature_service_api.py @@ -0,0 +1,3309 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from typing import Any, Dict +from zitadel_client.models.beta_feature_service_get_instance_features_request import BetaFeatureServiceGetInstanceFeaturesRequest +from zitadel_client.models.beta_feature_service_get_instance_features_response import BetaFeatureServiceGetInstanceFeaturesResponse +from zitadel_client.models.beta_feature_service_get_organization_features_request import BetaFeatureServiceGetOrganizationFeaturesRequest +from zitadel_client.models.beta_feature_service_get_organization_features_response import BetaFeatureServiceGetOrganizationFeaturesResponse +from zitadel_client.models.beta_feature_service_get_system_features_response import BetaFeatureServiceGetSystemFeaturesResponse +from zitadel_client.models.beta_feature_service_get_user_features_request import BetaFeatureServiceGetUserFeaturesRequest +from zitadel_client.models.beta_feature_service_get_user_features_response import BetaFeatureServiceGetUserFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_instance_features_response import BetaFeatureServiceResetInstanceFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_organization_features_request import BetaFeatureServiceResetOrganizationFeaturesRequest +from zitadel_client.models.beta_feature_service_reset_organization_features_response import BetaFeatureServiceResetOrganizationFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_system_features_response import BetaFeatureServiceResetSystemFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_user_features_request import BetaFeatureServiceResetUserFeaturesRequest +from zitadel_client.models.beta_feature_service_reset_user_features_response import BetaFeatureServiceResetUserFeaturesResponse +from zitadel_client.models.beta_feature_service_set_instance_features_request import BetaFeatureServiceSetInstanceFeaturesRequest +from zitadel_client.models.beta_feature_service_set_instance_features_response import BetaFeatureServiceSetInstanceFeaturesResponse +from zitadel_client.models.beta_feature_service_set_organization_features_request import BetaFeatureServiceSetOrganizationFeaturesRequest +from zitadel_client.models.beta_feature_service_set_organization_features_response import BetaFeatureServiceSetOrganizationFeaturesResponse +from zitadel_client.models.beta_feature_service_set_system_features_request import BetaFeatureServiceSetSystemFeaturesRequest +from zitadel_client.models.beta_feature_service_set_system_features_response import BetaFeatureServiceSetSystemFeaturesResponse +from zitadel_client.models.beta_feature_service_set_user_feature_request import BetaFeatureServiceSetUserFeatureRequest +from zitadel_client.models.beta_feature_service_set_user_features_response import BetaFeatureServiceSetUserFeaturesResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaFeatureServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_instance_features( + self, + beta_feature_service_get_instance_features_request: BetaFeatureServiceGetInstanceFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaFeatureServiceGetInstanceFeaturesResponse: + """GetInstanceFeatures + + + :param beta_feature_service_get_instance_features_request: (required) + :type beta_feature_service_get_instance_features_request: BetaFeatureServiceGetInstanceFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_instance_features_serialize( + beta_feature_service_get_instance_features_request=beta_feature_service_get_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': "BetaFeatureServiceGetInstanceFeaturesResponse", + } + 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 get_instance_features_with_http_info( + self, + beta_feature_service_get_instance_features_request: BetaFeatureServiceGetInstanceFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaFeatureServiceGetInstanceFeaturesResponse]: + """GetInstanceFeatures + + + :param beta_feature_service_get_instance_features_request: (required) + :type beta_feature_service_get_instance_features_request: BetaFeatureServiceGetInstanceFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_instance_features_serialize( + beta_feature_service_get_instance_features_request=beta_feature_service_get_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': "BetaFeatureServiceGetInstanceFeaturesResponse", + } + 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 get_instance_features_without_preload_content( + self, + beta_feature_service_get_instance_features_request: BetaFeatureServiceGetInstanceFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetInstanceFeatures + + + :param beta_feature_service_get_instance_features_request: (required) + :type beta_feature_service_get_instance_features_request: BetaFeatureServiceGetInstanceFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_instance_features_serialize( + beta_feature_service_get_instance_features_request=beta_feature_service_get_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': "BetaFeatureServiceGetInstanceFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_instance_features_serialize( + self, + beta_feature_service_get_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 beta_feature_service_get_instance_features_request is not None: + _body_params = beta_feature_service_get_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='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/GetInstanceFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_organization_features( + self, + beta_feature_service_get_organization_features_request: BetaFeatureServiceGetOrganizationFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaFeatureServiceGetOrganizationFeaturesResponse: + """GetOrganizationFeatures + + + :param beta_feature_service_get_organization_features_request: (required) + :type beta_feature_service_get_organization_features_request: BetaFeatureServiceGetOrganizationFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_organization_features_serialize( + beta_feature_service_get_organization_features_request=beta_feature_service_get_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceGetOrganizationFeaturesResponse", + } + 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 get_organization_features_with_http_info( + self, + beta_feature_service_get_organization_features_request: BetaFeatureServiceGetOrganizationFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaFeatureServiceGetOrganizationFeaturesResponse]: + """GetOrganizationFeatures + + + :param beta_feature_service_get_organization_features_request: (required) + :type beta_feature_service_get_organization_features_request: BetaFeatureServiceGetOrganizationFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_organization_features_serialize( + beta_feature_service_get_organization_features_request=beta_feature_service_get_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceGetOrganizationFeaturesResponse", + } + 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 get_organization_features_without_preload_content( + self, + beta_feature_service_get_organization_features_request: BetaFeatureServiceGetOrganizationFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetOrganizationFeatures + + + :param beta_feature_service_get_organization_features_request: (required) + :type beta_feature_service_get_organization_features_request: BetaFeatureServiceGetOrganizationFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_organization_features_serialize( + beta_feature_service_get_organization_features_request=beta_feature_service_get_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceGetOrganizationFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_organization_features_serialize( + self, + beta_feature_service_get_organization_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 beta_feature_service_get_organization_features_request is not None: + _body_params = beta_feature_service_get_organization_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='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/GetOrganizationFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_system_features( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaFeatureServiceGetSystemFeaturesResponse: + """GetSystemFeatures + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_system_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceGetSystemFeaturesResponse", + } + 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 get_system_features_with_http_info( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaFeatureServiceGetSystemFeaturesResponse]: + """GetSystemFeatures + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_system_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceGetSystemFeaturesResponse", + } + 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 get_system_features_without_preload_content( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetSystemFeatures + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_system_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceGetSystemFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_system_features_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/GetSystemFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_user_features( + self, + beta_feature_service_get_user_features_request: BetaFeatureServiceGetUserFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaFeatureServiceGetUserFeaturesResponse: + """GetUserFeatures + + + :param beta_feature_service_get_user_features_request: (required) + :type beta_feature_service_get_user_features_request: BetaFeatureServiceGetUserFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_features_serialize( + beta_feature_service_get_user_features_request=beta_feature_service_get_user_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceGetUserFeaturesResponse", + } + 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 get_user_features_with_http_info( + self, + beta_feature_service_get_user_features_request: BetaFeatureServiceGetUserFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaFeatureServiceGetUserFeaturesResponse]: + """GetUserFeatures + + + :param beta_feature_service_get_user_features_request: (required) + :type beta_feature_service_get_user_features_request: BetaFeatureServiceGetUserFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_features_serialize( + beta_feature_service_get_user_features_request=beta_feature_service_get_user_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceGetUserFeaturesResponse", + } + 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 get_user_features_without_preload_content( + self, + beta_feature_service_get_user_features_request: BetaFeatureServiceGetUserFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetUserFeatures + + + :param beta_feature_service_get_user_features_request: (required) + :type beta_feature_service_get_user_features_request: BetaFeatureServiceGetUserFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_features_serialize( + beta_feature_service_get_user_features_request=beta_feature_service_get_user_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceGetUserFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_features_serialize( + self, + beta_feature_service_get_user_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 beta_feature_service_get_user_features_request is not None: + _body_params = beta_feature_service_get_user_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='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/GetUserFeatures', + 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 reset_instance_features( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaFeatureServiceResetInstanceFeaturesResponse: + """ResetInstanceFeatures + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reset_instance_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetInstanceFeaturesResponse", + } + 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 reset_instance_features_with_http_info( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaFeatureServiceResetInstanceFeaturesResponse]: + """ResetInstanceFeatures + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reset_instance_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetInstanceFeaturesResponse", + } + 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 reset_instance_features_without_preload_content( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """ResetInstanceFeatures + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reset_instance_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetInstanceFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reset_instance_features_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/ResetInstanceFeatures', + 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 reset_organization_features( + self, + beta_feature_service_reset_organization_features_request: BetaFeatureServiceResetOrganizationFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaFeatureServiceResetOrganizationFeaturesResponse: + """ResetOrganizationFeatures + + + :param beta_feature_service_reset_organization_features_request: (required) + :type beta_feature_service_reset_organization_features_request: BetaFeatureServiceResetOrganizationFeaturesRequest + :param _request_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._reset_organization_features_serialize( + beta_feature_service_reset_organization_features_request=beta_feature_service_reset_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetOrganizationFeaturesResponse", + } + 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 reset_organization_features_with_http_info( + self, + beta_feature_service_reset_organization_features_request: BetaFeatureServiceResetOrganizationFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaFeatureServiceResetOrganizationFeaturesResponse]: + """ResetOrganizationFeatures + + + :param beta_feature_service_reset_organization_features_request: (required) + :type beta_feature_service_reset_organization_features_request: BetaFeatureServiceResetOrganizationFeaturesRequest + :param _request_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._reset_organization_features_serialize( + beta_feature_service_reset_organization_features_request=beta_feature_service_reset_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetOrganizationFeaturesResponse", + } + 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 reset_organization_features_without_preload_content( + self, + beta_feature_service_reset_organization_features_request: BetaFeatureServiceResetOrganizationFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """ResetOrganizationFeatures + + + :param beta_feature_service_reset_organization_features_request: (required) + :type beta_feature_service_reset_organization_features_request: BetaFeatureServiceResetOrganizationFeaturesRequest + :param _request_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._reset_organization_features_serialize( + beta_feature_service_reset_organization_features_request=beta_feature_service_reset_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetOrganizationFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reset_organization_features_serialize( + self, + beta_feature_service_reset_organization_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 beta_feature_service_reset_organization_features_request is not None: + _body_params = beta_feature_service_reset_organization_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='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/ResetOrganizationFeatures', + 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 reset_system_features( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaFeatureServiceResetSystemFeaturesResponse: + """ResetSystemFeatures + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reset_system_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetSystemFeaturesResponse", + } + 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 reset_system_features_with_http_info( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaFeatureServiceResetSystemFeaturesResponse]: + """ResetSystemFeatures + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reset_system_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetSystemFeaturesResponse", + } + 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 reset_system_features_without_preload_content( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """ResetSystemFeatures + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reset_system_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetSystemFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reset_system_features_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/ResetSystemFeatures', + 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 reset_user_features( + self, + beta_feature_service_reset_user_features_request: BetaFeatureServiceResetUserFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaFeatureServiceResetUserFeaturesResponse: + """ResetUserFeatures + + + :param beta_feature_service_reset_user_features_request: (required) + :type beta_feature_service_reset_user_features_request: BetaFeatureServiceResetUserFeaturesRequest + :param _request_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._reset_user_features_serialize( + beta_feature_service_reset_user_features_request=beta_feature_service_reset_user_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetUserFeaturesResponse", + } + 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 reset_user_features_with_http_info( + self, + beta_feature_service_reset_user_features_request: BetaFeatureServiceResetUserFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaFeatureServiceResetUserFeaturesResponse]: + """ResetUserFeatures + + + :param beta_feature_service_reset_user_features_request: (required) + :type beta_feature_service_reset_user_features_request: BetaFeatureServiceResetUserFeaturesRequest + :param _request_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._reset_user_features_serialize( + beta_feature_service_reset_user_features_request=beta_feature_service_reset_user_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetUserFeaturesResponse", + } + 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 reset_user_features_without_preload_content( + self, + beta_feature_service_reset_user_features_request: BetaFeatureServiceResetUserFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """ResetUserFeatures + + + :param beta_feature_service_reset_user_features_request: (required) + :type beta_feature_service_reset_user_features_request: BetaFeatureServiceResetUserFeaturesRequest + :param _request_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._reset_user_features_serialize( + beta_feature_service_reset_user_features_request=beta_feature_service_reset_user_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetUserFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reset_user_features_serialize( + self, + beta_feature_service_reset_user_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 beta_feature_service_reset_user_features_request is not None: + _body_params = beta_feature_service_reset_user_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='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/ResetUserFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_instance_features( + self, + beta_feature_service_set_instance_features_request: BetaFeatureServiceSetInstanceFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaFeatureServiceSetInstanceFeaturesResponse: + """SetInstanceFeatures + + + :param beta_feature_service_set_instance_features_request: (required) + :type beta_feature_service_set_instance_features_request: BetaFeatureServiceSetInstanceFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_instance_features_serialize( + beta_feature_service_set_instance_features_request=beta_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': "BetaFeatureServiceSetInstanceFeaturesResponse", + } + 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 set_instance_features_with_http_info( + self, + beta_feature_service_set_instance_features_request: BetaFeatureServiceSetInstanceFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaFeatureServiceSetInstanceFeaturesResponse]: + """SetInstanceFeatures + + + :param beta_feature_service_set_instance_features_request: (required) + :type beta_feature_service_set_instance_features_request: BetaFeatureServiceSetInstanceFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_instance_features_serialize( + beta_feature_service_set_instance_features_request=beta_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': "BetaFeatureServiceSetInstanceFeaturesResponse", + } + 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 set_instance_features_without_preload_content( + self, + beta_feature_service_set_instance_features_request: BetaFeatureServiceSetInstanceFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """SetInstanceFeatures + + + :param beta_feature_service_set_instance_features_request: (required) + :type beta_feature_service_set_instance_features_request: BetaFeatureServiceSetInstanceFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_instance_features_serialize( + beta_feature_service_set_instance_features_request=beta_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': "BetaFeatureServiceSetInstanceFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_instance_features_serialize( + self, + beta_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 beta_feature_service_set_instance_features_request is not None: + _body_params = beta_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='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/SetInstanceFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_organization_features( + self, + beta_feature_service_set_organization_features_request: BetaFeatureServiceSetOrganizationFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaFeatureServiceSetOrganizationFeaturesResponse: + """SetOrganizationFeatures + + + :param beta_feature_service_set_organization_features_request: (required) + :type beta_feature_service_set_organization_features_request: BetaFeatureServiceSetOrganizationFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_organization_features_serialize( + beta_feature_service_set_organization_features_request=beta_feature_service_set_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceSetOrganizationFeaturesResponse", + } + 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 set_organization_features_with_http_info( + self, + beta_feature_service_set_organization_features_request: BetaFeatureServiceSetOrganizationFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaFeatureServiceSetOrganizationFeaturesResponse]: + """SetOrganizationFeatures + + + :param beta_feature_service_set_organization_features_request: (required) + :type beta_feature_service_set_organization_features_request: BetaFeatureServiceSetOrganizationFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_organization_features_serialize( + beta_feature_service_set_organization_features_request=beta_feature_service_set_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceSetOrganizationFeaturesResponse", + } + 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 set_organization_features_without_preload_content( + self, + beta_feature_service_set_organization_features_request: BetaFeatureServiceSetOrganizationFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """SetOrganizationFeatures + + + :param beta_feature_service_set_organization_features_request: (required) + :type beta_feature_service_set_organization_features_request: BetaFeatureServiceSetOrganizationFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_organization_features_serialize( + beta_feature_service_set_organization_features_request=beta_feature_service_set_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceSetOrganizationFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_organization_features_serialize( + self, + beta_feature_service_set_organization_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 beta_feature_service_set_organization_features_request is not None: + _body_params = beta_feature_service_set_organization_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='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/SetOrganizationFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_system_features( + self, + beta_feature_service_set_system_features_request: BetaFeatureServiceSetSystemFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaFeatureServiceSetSystemFeaturesResponse: + """SetSystemFeatures + + + :param beta_feature_service_set_system_features_request: (required) + :type beta_feature_service_set_system_features_request: BetaFeatureServiceSetSystemFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_system_features_serialize( + beta_feature_service_set_system_features_request=beta_feature_service_set_system_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceSetSystemFeaturesResponse", + } + 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 set_system_features_with_http_info( + self, + beta_feature_service_set_system_features_request: BetaFeatureServiceSetSystemFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaFeatureServiceSetSystemFeaturesResponse]: + """SetSystemFeatures + + + :param beta_feature_service_set_system_features_request: (required) + :type beta_feature_service_set_system_features_request: BetaFeatureServiceSetSystemFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_system_features_serialize( + beta_feature_service_set_system_features_request=beta_feature_service_set_system_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceSetSystemFeaturesResponse", + } + 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 set_system_features_without_preload_content( + self, + beta_feature_service_set_system_features_request: BetaFeatureServiceSetSystemFeaturesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """SetSystemFeatures + + + :param beta_feature_service_set_system_features_request: (required) + :type beta_feature_service_set_system_features_request: BetaFeatureServiceSetSystemFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_system_features_serialize( + beta_feature_service_set_system_features_request=beta_feature_service_set_system_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceSetSystemFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_system_features_serialize( + self, + beta_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 beta_feature_service_set_system_features_request is not None: + _body_params = beta_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='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/SetSystemFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_user_features( + self, + beta_feature_service_set_user_feature_request: BetaFeatureServiceSetUserFeatureRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaFeatureServiceSetUserFeaturesResponse: + """SetUserFeatures + + + :param beta_feature_service_set_user_feature_request: (required) + :type beta_feature_service_set_user_feature_request: BetaFeatureServiceSetUserFeatureRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_user_features_serialize( + beta_feature_service_set_user_feature_request=beta_feature_service_set_user_feature_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceSetUserFeaturesResponse", + } + 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 set_user_features_with_http_info( + self, + beta_feature_service_set_user_feature_request: BetaFeatureServiceSetUserFeatureRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaFeatureServiceSetUserFeaturesResponse]: + """SetUserFeatures + + + :param beta_feature_service_set_user_feature_request: (required) + :type beta_feature_service_set_user_feature_request: BetaFeatureServiceSetUserFeatureRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_user_features_serialize( + beta_feature_service_set_user_feature_request=beta_feature_service_set_user_feature_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceSetUserFeaturesResponse", + } + 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 set_user_features_without_preload_content( + self, + beta_feature_service_set_user_feature_request: BetaFeatureServiceSetUserFeatureRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """SetUserFeatures + + + :param beta_feature_service_set_user_feature_request: (required) + :type beta_feature_service_set_user_feature_request: BetaFeatureServiceSetUserFeatureRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_user_features_serialize( + beta_feature_service_set_user_feature_request=beta_feature_service_set_user_feature_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceSetUserFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_user_features_serialize( + self, + beta_feature_service_set_user_feature_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 beta_feature_service_set_user_feature_request is not None: + _body_params = beta_feature_service_set_user_feature_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/SetUserFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_oidc_service_api.py b/zitadel_client/api/beta_oidc_service_api.py new file mode 100644 index 00000000..afb53423 --- /dev/null +++ b/zitadel_client/api/beta_oidc_service_api.py @@ -0,0 +1,825 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_oidc_service_create_callback_request import BetaOIDCServiceCreateCallbackRequest +from zitadel_client.models.beta_oidc_service_create_callback_response import BetaOIDCServiceCreateCallbackResponse +from zitadel_client.models.beta_oidc_service_get_auth_request_request import BetaOIDCServiceGetAuthRequestRequest +from zitadel_client.models.beta_oidc_service_get_auth_request_response import BetaOIDCServiceGetAuthRequestResponse +from zitadel_client.models.no_op200_response11 import NoOp200Response11 + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaOIDCServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_callback( + self, + beta_oidc_service_create_callback_request: BetaOIDCServiceCreateCallbackRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaOIDCServiceCreateCallbackResponse: + """CreateCallback + + + :param beta_oidc_service_create_callback_request: (required) + :type beta_oidc_service_create_callback_request: BetaOIDCServiceCreateCallbackRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_callback_serialize( + beta_oidc_service_create_callback_request=beta_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': "BetaOIDCServiceCreateCallbackResponse", + } + 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 create_callback_with_http_info( + self, + beta_oidc_service_create_callback_request: BetaOIDCServiceCreateCallbackRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaOIDCServiceCreateCallbackResponse]: + """CreateCallback + + + :param beta_oidc_service_create_callback_request: (required) + :type beta_oidc_service_create_callback_request: BetaOIDCServiceCreateCallbackRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_callback_serialize( + beta_oidc_service_create_callback_request=beta_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': "BetaOIDCServiceCreateCallbackResponse", + } + 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 create_callback_without_preload_content( + self, + beta_oidc_service_create_callback_request: BetaOIDCServiceCreateCallbackRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """CreateCallback + + + :param beta_oidc_service_create_callback_request: (required) + :type beta_oidc_service_create_callback_request: BetaOIDCServiceCreateCallbackRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_callback_serialize( + beta_oidc_service_create_callback_request=beta_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': "BetaOIDCServiceCreateCallbackResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_callback_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_oidc_service_create_callback_request is not None: + _body_params = beta_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='/zitadel.oidc.v2beta.OIDCService/CreateCallback', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_auth_request( + self, + beta_oidc_service_get_auth_request_request: BetaOIDCServiceGetAuthRequestRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaOIDCServiceGetAuthRequestResponse: + """GetAuthRequest + + + :param beta_oidc_service_get_auth_request_request: (required) + :type beta_oidc_service_get_auth_request_request: BetaOIDCServiceGetAuthRequestRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_auth_request_serialize( + beta_oidc_service_get_auth_request_request=beta_oidc_service_get_auth_request_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOIDCServiceGetAuthRequestResponse", + } + 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 get_auth_request_with_http_info( + self, + beta_oidc_service_get_auth_request_request: BetaOIDCServiceGetAuthRequestRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaOIDCServiceGetAuthRequestResponse]: + """GetAuthRequest + + + :param beta_oidc_service_get_auth_request_request: (required) + :type beta_oidc_service_get_auth_request_request: BetaOIDCServiceGetAuthRequestRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_auth_request_serialize( + beta_oidc_service_get_auth_request_request=beta_oidc_service_get_auth_request_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOIDCServiceGetAuthRequestResponse", + } + 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 get_auth_request_without_preload_content( + self, + beta_oidc_service_get_auth_request_request: BetaOIDCServiceGetAuthRequestRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetAuthRequest + + + :param beta_oidc_service_get_auth_request_request: (required) + :type beta_oidc_service_get_auth_request_request: BetaOIDCServiceGetAuthRequestRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_auth_request_serialize( + beta_oidc_service_get_auth_request_request=beta_oidc_service_get_auth_request_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOIDCServiceGetAuthRequestResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_auth_request_serialize( + self, + beta_oidc_service_get_auth_request_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 beta_oidc_service_get_auth_request_request is not None: + _body_params = beta_oidc_service_get_auth_request_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.oidc.v2beta.OIDCService/GetAuthRequest', + 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 no_op( + 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, + ) -> NoOp200Response11: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response11", + } + 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 no_op_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[NoOp200Response11]: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response11", + } + 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 no_op_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: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response11", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _no_op_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='/e66c8195', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_organization_service_api.py b/zitadel_client/api/beta_organization_service_api.py new file mode 100644 index 00000000..54dfc226 --- /dev/null +++ b/zitadel_client/api/beta_organization_service_api.py @@ -0,0 +1,555 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_organization_service_add_organization_request import BetaOrganizationServiceAddOrganizationRequest +from zitadel_client.models.beta_organization_service_add_organization_response import BetaOrganizationServiceAddOrganizationResponse +from zitadel_client.models.no_op200_response10 import NoOp200Response10 + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaOrganizationServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def add_organization( + self, + beta_organization_service_add_organization_request: BetaOrganizationServiceAddOrganizationRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaOrganizationServiceAddOrganizationResponse: + """AddOrganization + + Create a new organization and grant the user(s) permission to manage it + + :param beta_organization_service_add_organization_request: (required) + :type beta_organization_service_add_organization_request: BetaOrganizationServiceAddOrganizationRequest + :param _request_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._add_organization_serialize( + beta_organization_service_add_organization_request=beta_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': "BetaOrganizationServiceAddOrganizationResponse", + } + 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 add_organization_with_http_info( + self, + beta_organization_service_add_organization_request: BetaOrganizationServiceAddOrganizationRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaOrganizationServiceAddOrganizationResponse]: + """AddOrganization + + Create a new organization and grant the user(s) permission to manage it + + :param beta_organization_service_add_organization_request: (required) + :type beta_organization_service_add_organization_request: BetaOrganizationServiceAddOrganizationRequest + :param _request_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._add_organization_serialize( + beta_organization_service_add_organization_request=beta_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': "BetaOrganizationServiceAddOrganizationResponse", + } + 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 add_organization_without_preload_content( + self, + beta_organization_service_add_organization_request: BetaOrganizationServiceAddOrganizationRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """AddOrganization + + Create a new organization and grant the user(s) permission to manage it + + :param beta_organization_service_add_organization_request: (required) + :type beta_organization_service_add_organization_request: BetaOrganizationServiceAddOrganizationRequest + :param _request_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._add_organization_serialize( + beta_organization_service_add_organization_request=beta_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': "BetaOrganizationServiceAddOrganizationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_organization_serialize( + self, + beta_organization_service_add_organization_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 beta_organization_service_add_organization_request is not None: + _body_params = beta_organization_service_add_organization_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/AddOrganization', + 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 no_op( + 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, + ) -> NoOp200Response10: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response10", + } + 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 no_op_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[NoOp200Response10]: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response10", + } + 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 no_op_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: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response10", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _no_op_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='/7c423390', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_session_service_api.py b/zitadel_client/api/beta_session_service_api.py new file mode 100644 index 00000000..d206770c --- /dev/null +++ b/zitadel_client/api/beta_session_service_api.py @@ -0,0 +1,1659 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_session_service_create_session_request import BetaSessionServiceCreateSessionRequest +from zitadel_client.models.beta_session_service_create_session_response import BetaSessionServiceCreateSessionResponse +from zitadel_client.models.beta_session_service_delete_session_request import BetaSessionServiceDeleteSessionRequest +from zitadel_client.models.beta_session_service_delete_session_response import BetaSessionServiceDeleteSessionResponse +from zitadel_client.models.beta_session_service_get_session_request import BetaSessionServiceGetSessionRequest +from zitadel_client.models.beta_session_service_get_session_response import BetaSessionServiceGetSessionResponse +from zitadel_client.models.beta_session_service_list_sessions_request import BetaSessionServiceListSessionsRequest +from zitadel_client.models.beta_session_service_list_sessions_response import BetaSessionServiceListSessionsResponse +from zitadel_client.models.beta_session_service_set_session_request import BetaSessionServiceSetSessionRequest +from zitadel_client.models.beta_session_service_set_session_response import BetaSessionServiceSetSessionResponse +from zitadel_client.models.no_op200_response1 import NoOp200Response1 + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaSessionServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_session( + self, + beta_session_service_create_session_request: BetaSessionServiceCreateSessionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSessionServiceCreateSessionResponse: + """CreateSession + + Create a new session + + :param beta_session_service_create_session_request: (required) + :type beta_session_service_create_session_request: BetaSessionServiceCreateSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_session_serialize( + beta_session_service_create_session_request=beta_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]] = { + '200': "BetaSessionServiceCreateSessionResponse", + } + 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 create_session_with_http_info( + self, + beta_session_service_create_session_request: BetaSessionServiceCreateSessionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSessionServiceCreateSessionResponse]: + """CreateSession + + Create a new session + + :param beta_session_service_create_session_request: (required) + :type beta_session_service_create_session_request: BetaSessionServiceCreateSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_session_serialize( + beta_session_service_create_session_request=beta_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]] = { + '200': "BetaSessionServiceCreateSessionResponse", + } + 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 create_session_without_preload_content( + self, + beta_session_service_create_session_request: BetaSessionServiceCreateSessionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """CreateSession + + Create a new session + + :param beta_session_service_create_session_request: (required) + :type beta_session_service_create_session_request: BetaSessionServiceCreateSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_session_serialize( + beta_session_service_create_session_request=beta_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]] = { + '200': "BetaSessionServiceCreateSessionResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_session_serialize( + self, + beta_session_service_create_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_session_service_create_session_request is not None: + _body_params = beta_session_service_create_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='POST', + resource_path='/zitadel.session.v2beta.SessionService/CreateSession', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_session( + self, + beta_session_service_delete_session_request: BetaSessionServiceDeleteSessionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSessionServiceDeleteSessionResponse: + """DeleteSession + + Terminate a session + + :param beta_session_service_delete_session_request: (required) + :type beta_session_service_delete_session_request: BetaSessionServiceDeleteSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_session_serialize( + beta_session_service_delete_session_request=beta_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': "BetaSessionServiceDeleteSessionResponse", + } + 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 delete_session_with_http_info( + self, + beta_session_service_delete_session_request: BetaSessionServiceDeleteSessionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSessionServiceDeleteSessionResponse]: + """DeleteSession + + Terminate a session + + :param beta_session_service_delete_session_request: (required) + :type beta_session_service_delete_session_request: BetaSessionServiceDeleteSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_session_serialize( + beta_session_service_delete_session_request=beta_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': "BetaSessionServiceDeleteSessionResponse", + } + 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 delete_session_without_preload_content( + self, + beta_session_service_delete_session_request: BetaSessionServiceDeleteSessionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """DeleteSession + + Terminate a session + + :param beta_session_service_delete_session_request: (required) + :type beta_session_service_delete_session_request: BetaSessionServiceDeleteSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_session_serialize( + beta_session_service_delete_session_request=beta_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': "BetaSessionServiceDeleteSessionResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_session_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_session_service_delete_session_request is not None: + _body_params = beta_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='POST', + resource_path='/zitadel.session.v2beta.SessionService/DeleteSession', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_session( + self, + beta_session_service_get_session_request: BetaSessionServiceGetSessionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSessionServiceGetSessionResponse: + """GetSession + + GetSession a session + + :param beta_session_service_get_session_request: (required) + :type beta_session_service_get_session_request: BetaSessionServiceGetSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_session_serialize( + beta_session_service_get_session_request=beta_session_service_get_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSessionServiceGetSessionResponse", + } + 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 get_session_with_http_info( + self, + beta_session_service_get_session_request: BetaSessionServiceGetSessionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSessionServiceGetSessionResponse]: + """GetSession + + GetSession a session + + :param beta_session_service_get_session_request: (required) + :type beta_session_service_get_session_request: BetaSessionServiceGetSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_session_serialize( + beta_session_service_get_session_request=beta_session_service_get_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSessionServiceGetSessionResponse", + } + 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 get_session_without_preload_content( + self, + beta_session_service_get_session_request: BetaSessionServiceGetSessionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetSession + + GetSession a session + + :param beta_session_service_get_session_request: (required) + :type beta_session_service_get_session_request: BetaSessionServiceGetSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_session_serialize( + beta_session_service_get_session_request=beta_session_service_get_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSessionServiceGetSessionResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_session_serialize( + self, + beta_session_service_get_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_session_service_get_session_request is not None: + _body_params = beta_session_service_get_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='POST', + resource_path='/zitadel.session.v2beta.SessionService/GetSession', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_sessions( + self, + beta_session_service_list_sessions_request: BetaSessionServiceListSessionsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSessionServiceListSessionsResponse: + """ListSessions + + Search sessions + + :param beta_session_service_list_sessions_request: (required) + :type beta_session_service_list_sessions_request: BetaSessionServiceListSessionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_sessions_serialize( + beta_session_service_list_sessions_request=beta_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': "BetaSessionServiceListSessionsResponse", + } + 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 list_sessions_with_http_info( + self, + beta_session_service_list_sessions_request: BetaSessionServiceListSessionsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSessionServiceListSessionsResponse]: + """ListSessions + + Search sessions + + :param beta_session_service_list_sessions_request: (required) + :type beta_session_service_list_sessions_request: BetaSessionServiceListSessionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_sessions_serialize( + beta_session_service_list_sessions_request=beta_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': "BetaSessionServiceListSessionsResponse", + } + 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 list_sessions_without_preload_content( + self, + beta_session_service_list_sessions_request: BetaSessionServiceListSessionsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """ListSessions + + Search sessions + + :param beta_session_service_list_sessions_request: (required) + :type beta_session_service_list_sessions_request: BetaSessionServiceListSessionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_sessions_serialize( + beta_session_service_list_sessions_request=beta_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': "BetaSessionServiceListSessionsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_sessions_serialize( + self, + beta_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 beta_session_service_list_sessions_request is not None: + _body_params = beta_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='/zitadel.session.v2beta.SessionService/ListSessions', + 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 no_op( + 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, + ) -> NoOp200Response1: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response1", + } + 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 no_op_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[NoOp200Response1]: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response1", + } + 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 no_op_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: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _no_op_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='/6b54ddc1', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_session( + self, + beta_session_service_set_session_request: BetaSessionServiceSetSessionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSessionServiceSetSessionResponse: + """SetSession + + Update a session + + :param beta_session_service_set_session_request: (required) + :type beta_session_service_set_session_request: BetaSessionServiceSetSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_session_serialize( + beta_session_service_set_session_request=beta_session_service_set_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSessionServiceSetSessionResponse", + } + 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 set_session_with_http_info( + self, + beta_session_service_set_session_request: BetaSessionServiceSetSessionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSessionServiceSetSessionResponse]: + """SetSession + + Update a session + + :param beta_session_service_set_session_request: (required) + :type beta_session_service_set_session_request: BetaSessionServiceSetSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_session_serialize( + beta_session_service_set_session_request=beta_session_service_set_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSessionServiceSetSessionResponse", + } + 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 set_session_without_preload_content( + self, + beta_session_service_set_session_request: BetaSessionServiceSetSessionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """SetSession + + Update a session + + :param beta_session_service_set_session_request: (required) + :type beta_session_service_set_session_request: BetaSessionServiceSetSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_session_serialize( + beta_session_service_set_session_request=beta_session_service_set_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSessionServiceSetSessionResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_session_serialize( + self, + beta_session_service_set_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_session_service_set_session_request is not None: + _body_params = beta_session_service_set_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='POST', + resource_path='/zitadel.session.v2beta.SessionService/SetSession', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_settings_service_api.py b/zitadel_client/api/beta_settings_service_api.py new file mode 100644 index 00000000..9dfeaaf0 --- /dev/null +++ b/zitadel_client/api/beta_settings_service_api.py @@ -0,0 +1,3070 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from typing import Any, Dict +from zitadel_client.models.beta_settings_service_get_active_identity_providers_request import BetaSettingsServiceGetActiveIdentityProvidersRequest +from zitadel_client.models.beta_settings_service_get_active_identity_providers_response import BetaSettingsServiceGetActiveIdentityProvidersResponse +from zitadel_client.models.beta_settings_service_get_branding_settings_request import BetaSettingsServiceGetBrandingSettingsRequest +from zitadel_client.models.beta_settings_service_get_branding_settings_response import BetaSettingsServiceGetBrandingSettingsResponse +from zitadel_client.models.beta_settings_service_get_domain_settings_request import BetaSettingsServiceGetDomainSettingsRequest +from zitadel_client.models.beta_settings_service_get_domain_settings_response import BetaSettingsServiceGetDomainSettingsResponse +from zitadel_client.models.beta_settings_service_get_general_settings_response import BetaSettingsServiceGetGeneralSettingsResponse +from zitadel_client.models.beta_settings_service_get_legal_and_support_settings_request import BetaSettingsServiceGetLegalAndSupportSettingsRequest +from zitadel_client.models.beta_settings_service_get_legal_and_support_settings_response import BetaSettingsServiceGetLegalAndSupportSettingsResponse +from zitadel_client.models.beta_settings_service_get_lockout_settings_request import BetaSettingsServiceGetLockoutSettingsRequest +from zitadel_client.models.beta_settings_service_get_lockout_settings_response import BetaSettingsServiceGetLockoutSettingsResponse +from zitadel_client.models.beta_settings_service_get_login_settings_request import BetaSettingsServiceGetLoginSettingsRequest +from zitadel_client.models.beta_settings_service_get_login_settings_response import BetaSettingsServiceGetLoginSettingsResponse +from zitadel_client.models.beta_settings_service_get_password_complexity_settings_request import BetaSettingsServiceGetPasswordComplexitySettingsRequest +from zitadel_client.models.beta_settings_service_get_password_complexity_settings_response import BetaSettingsServiceGetPasswordComplexitySettingsResponse +from zitadel_client.models.beta_settings_service_get_password_expiry_settings_request import BetaSettingsServiceGetPasswordExpirySettingsRequest +from zitadel_client.models.beta_settings_service_get_password_expiry_settings_response import BetaSettingsServiceGetPasswordExpirySettingsResponse +from zitadel_client.models.beta_settings_service_get_security_settings_response import BetaSettingsServiceGetSecuritySettingsResponse +from zitadel_client.models.beta_settings_service_set_security_settings_request import BetaSettingsServiceSetSecuritySettingsRequest +from zitadel_client.models.beta_settings_service_set_security_settings_response import BetaSettingsServiceSetSecuritySettingsResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaSettingsServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_active_identity_providers( + self, + beta_settings_service_get_active_identity_providers_request: BetaSettingsServiceGetActiveIdentityProvidersRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSettingsServiceGetActiveIdentityProvidersResponse: + """GetActiveIdentityProviders + + Get the current active identity providers + + :param beta_settings_service_get_active_identity_providers_request: (required) + :type beta_settings_service_get_active_identity_providers_request: BetaSettingsServiceGetActiveIdentityProvidersRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_active_identity_providers_serialize( + beta_settings_service_get_active_identity_providers_request=beta_settings_service_get_active_identity_providers_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetActiveIdentityProvidersResponse", + } + 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 get_active_identity_providers_with_http_info( + self, + beta_settings_service_get_active_identity_providers_request: BetaSettingsServiceGetActiveIdentityProvidersRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSettingsServiceGetActiveIdentityProvidersResponse]: + """GetActiveIdentityProviders + + Get the current active identity providers + + :param beta_settings_service_get_active_identity_providers_request: (required) + :type beta_settings_service_get_active_identity_providers_request: BetaSettingsServiceGetActiveIdentityProvidersRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_active_identity_providers_serialize( + beta_settings_service_get_active_identity_providers_request=beta_settings_service_get_active_identity_providers_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetActiveIdentityProvidersResponse", + } + 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 get_active_identity_providers_without_preload_content( + self, + beta_settings_service_get_active_identity_providers_request: BetaSettingsServiceGetActiveIdentityProvidersRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetActiveIdentityProviders + + Get the current active identity providers + + :param beta_settings_service_get_active_identity_providers_request: (required) + :type beta_settings_service_get_active_identity_providers_request: BetaSettingsServiceGetActiveIdentityProvidersRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_active_identity_providers_serialize( + beta_settings_service_get_active_identity_providers_request=beta_settings_service_get_active_identity_providers_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetActiveIdentityProvidersResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_active_identity_providers_serialize( + self, + beta_settings_service_get_active_identity_providers_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 beta_settings_service_get_active_identity_providers_request is not None: + _body_params = beta_settings_service_get_active_identity_providers_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetActiveIdentityProviders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_branding_settings( + self, + beta_settings_service_get_branding_settings_request: BetaSettingsServiceGetBrandingSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSettingsServiceGetBrandingSettingsResponse: + """GetBrandingSettings + + Get the current active branding settings + + :param beta_settings_service_get_branding_settings_request: (required) + :type beta_settings_service_get_branding_settings_request: BetaSettingsServiceGetBrandingSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_branding_settings_serialize( + beta_settings_service_get_branding_settings_request=beta_settings_service_get_branding_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetBrandingSettingsResponse", + } + 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 get_branding_settings_with_http_info( + self, + beta_settings_service_get_branding_settings_request: BetaSettingsServiceGetBrandingSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSettingsServiceGetBrandingSettingsResponse]: + """GetBrandingSettings + + Get the current active branding settings + + :param beta_settings_service_get_branding_settings_request: (required) + :type beta_settings_service_get_branding_settings_request: BetaSettingsServiceGetBrandingSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_branding_settings_serialize( + beta_settings_service_get_branding_settings_request=beta_settings_service_get_branding_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetBrandingSettingsResponse", + } + 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 get_branding_settings_without_preload_content( + self, + beta_settings_service_get_branding_settings_request: BetaSettingsServiceGetBrandingSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetBrandingSettings + + Get the current active branding settings + + :param beta_settings_service_get_branding_settings_request: (required) + :type beta_settings_service_get_branding_settings_request: BetaSettingsServiceGetBrandingSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_branding_settings_serialize( + beta_settings_service_get_branding_settings_request=beta_settings_service_get_branding_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetBrandingSettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_branding_settings_serialize( + self, + beta_settings_service_get_branding_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_branding_settings_request is not None: + _body_params = beta_settings_service_get_branding_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetBrandingSettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_domain_settings( + self, + beta_settings_service_get_domain_settings_request: BetaSettingsServiceGetDomainSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSettingsServiceGetDomainSettingsResponse: + """GetDomainSettings + + Get the domain settings + + :param beta_settings_service_get_domain_settings_request: (required) + :type beta_settings_service_get_domain_settings_request: BetaSettingsServiceGetDomainSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_domain_settings_serialize( + beta_settings_service_get_domain_settings_request=beta_settings_service_get_domain_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetDomainSettingsResponse", + } + 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 get_domain_settings_with_http_info( + self, + beta_settings_service_get_domain_settings_request: BetaSettingsServiceGetDomainSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSettingsServiceGetDomainSettingsResponse]: + """GetDomainSettings + + Get the domain settings + + :param beta_settings_service_get_domain_settings_request: (required) + :type beta_settings_service_get_domain_settings_request: BetaSettingsServiceGetDomainSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_domain_settings_serialize( + beta_settings_service_get_domain_settings_request=beta_settings_service_get_domain_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetDomainSettingsResponse", + } + 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 get_domain_settings_without_preload_content( + self, + beta_settings_service_get_domain_settings_request: BetaSettingsServiceGetDomainSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetDomainSettings + + Get the domain settings + + :param beta_settings_service_get_domain_settings_request: (required) + :type beta_settings_service_get_domain_settings_request: BetaSettingsServiceGetDomainSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_domain_settings_serialize( + beta_settings_service_get_domain_settings_request=beta_settings_service_get_domain_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetDomainSettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_domain_settings_serialize( + self, + beta_settings_service_get_domain_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_domain_settings_request is not None: + _body_params = beta_settings_service_get_domain_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetDomainSettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_general_settings( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSettingsServiceGetGeneralSettingsResponse: + """GetGeneralSettings + + Get basic information over the instance + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_general_settings_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetGeneralSettingsResponse", + } + 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 get_general_settings_with_http_info( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSettingsServiceGetGeneralSettingsResponse]: + """GetGeneralSettings + + Get basic information over the instance + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_general_settings_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetGeneralSettingsResponse", + } + 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 get_general_settings_without_preload_content( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetGeneralSettings + + Get basic information over the instance + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_general_settings_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetGeneralSettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_general_settings_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetGeneralSettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_legal_and_support_settings( + self, + beta_settings_service_get_legal_and_support_settings_request: BetaSettingsServiceGetLegalAndSupportSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSettingsServiceGetLegalAndSupportSettingsResponse: + """GetLegalAndSupportSettings + + Get the legal and support settings + + :param beta_settings_service_get_legal_and_support_settings_request: (required) + :type beta_settings_service_get_legal_and_support_settings_request: BetaSettingsServiceGetLegalAndSupportSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_legal_and_support_settings_serialize( + beta_settings_service_get_legal_and_support_settings_request=beta_settings_service_get_legal_and_support_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetLegalAndSupportSettingsResponse", + } + 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 get_legal_and_support_settings_with_http_info( + self, + beta_settings_service_get_legal_and_support_settings_request: BetaSettingsServiceGetLegalAndSupportSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSettingsServiceGetLegalAndSupportSettingsResponse]: + """GetLegalAndSupportSettings + + Get the legal and support settings + + :param beta_settings_service_get_legal_and_support_settings_request: (required) + :type beta_settings_service_get_legal_and_support_settings_request: BetaSettingsServiceGetLegalAndSupportSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_legal_and_support_settings_serialize( + beta_settings_service_get_legal_and_support_settings_request=beta_settings_service_get_legal_and_support_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetLegalAndSupportSettingsResponse", + } + 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 get_legal_and_support_settings_without_preload_content( + self, + beta_settings_service_get_legal_and_support_settings_request: BetaSettingsServiceGetLegalAndSupportSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetLegalAndSupportSettings + + Get the legal and support settings + + :param beta_settings_service_get_legal_and_support_settings_request: (required) + :type beta_settings_service_get_legal_and_support_settings_request: BetaSettingsServiceGetLegalAndSupportSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_legal_and_support_settings_serialize( + beta_settings_service_get_legal_and_support_settings_request=beta_settings_service_get_legal_and_support_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetLegalAndSupportSettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_legal_and_support_settings_serialize( + self, + beta_settings_service_get_legal_and_support_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_legal_and_support_settings_request is not None: + _body_params = beta_settings_service_get_legal_and_support_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetLegalAndSupportSettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_lockout_settings( + self, + beta_settings_service_get_lockout_settings_request: BetaSettingsServiceGetLockoutSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSettingsServiceGetLockoutSettingsResponse: + """GetLockoutSettings + + Get the lockout settings + + :param beta_settings_service_get_lockout_settings_request: (required) + :type beta_settings_service_get_lockout_settings_request: BetaSettingsServiceGetLockoutSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_lockout_settings_serialize( + beta_settings_service_get_lockout_settings_request=beta_settings_service_get_lockout_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetLockoutSettingsResponse", + } + 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 get_lockout_settings_with_http_info( + self, + beta_settings_service_get_lockout_settings_request: BetaSettingsServiceGetLockoutSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSettingsServiceGetLockoutSettingsResponse]: + """GetLockoutSettings + + Get the lockout settings + + :param beta_settings_service_get_lockout_settings_request: (required) + :type beta_settings_service_get_lockout_settings_request: BetaSettingsServiceGetLockoutSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_lockout_settings_serialize( + beta_settings_service_get_lockout_settings_request=beta_settings_service_get_lockout_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetLockoutSettingsResponse", + } + 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 get_lockout_settings_without_preload_content( + self, + beta_settings_service_get_lockout_settings_request: BetaSettingsServiceGetLockoutSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetLockoutSettings + + Get the lockout settings + + :param beta_settings_service_get_lockout_settings_request: (required) + :type beta_settings_service_get_lockout_settings_request: BetaSettingsServiceGetLockoutSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_lockout_settings_serialize( + beta_settings_service_get_lockout_settings_request=beta_settings_service_get_lockout_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetLockoutSettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_lockout_settings_serialize( + self, + beta_settings_service_get_lockout_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_lockout_settings_request is not None: + _body_params = beta_settings_service_get_lockout_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetLockoutSettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_login_settings( + self, + beta_settings_service_get_login_settings_request: BetaSettingsServiceGetLoginSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSettingsServiceGetLoginSettingsResponse: + """GetLoginSettings + + Get the login settings + + :param beta_settings_service_get_login_settings_request: (required) + :type beta_settings_service_get_login_settings_request: BetaSettingsServiceGetLoginSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_login_settings_serialize( + beta_settings_service_get_login_settings_request=beta_settings_service_get_login_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetLoginSettingsResponse", + } + 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 get_login_settings_with_http_info( + self, + beta_settings_service_get_login_settings_request: BetaSettingsServiceGetLoginSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSettingsServiceGetLoginSettingsResponse]: + """GetLoginSettings + + Get the login settings + + :param beta_settings_service_get_login_settings_request: (required) + :type beta_settings_service_get_login_settings_request: BetaSettingsServiceGetLoginSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_login_settings_serialize( + beta_settings_service_get_login_settings_request=beta_settings_service_get_login_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetLoginSettingsResponse", + } + 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 get_login_settings_without_preload_content( + self, + beta_settings_service_get_login_settings_request: BetaSettingsServiceGetLoginSettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetLoginSettings + + Get the login settings + + :param beta_settings_service_get_login_settings_request: (required) + :type beta_settings_service_get_login_settings_request: BetaSettingsServiceGetLoginSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_login_settings_serialize( + beta_settings_service_get_login_settings_request=beta_settings_service_get_login_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetLoginSettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_login_settings_serialize( + self, + beta_settings_service_get_login_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_login_settings_request is not None: + _body_params = beta_settings_service_get_login_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetLoginSettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_password_complexity_settings( + self, + beta_settings_service_get_password_complexity_settings_request: BetaSettingsServiceGetPasswordComplexitySettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSettingsServiceGetPasswordComplexitySettingsResponse: + """GetPasswordComplexitySettings + + Get the password complexity settings + + :param beta_settings_service_get_password_complexity_settings_request: (required) + :type beta_settings_service_get_password_complexity_settings_request: BetaSettingsServiceGetPasswordComplexitySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_password_complexity_settings_serialize( + beta_settings_service_get_password_complexity_settings_request=beta_settings_service_get_password_complexity_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetPasswordComplexitySettingsResponse", + } + 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 get_password_complexity_settings_with_http_info( + self, + beta_settings_service_get_password_complexity_settings_request: BetaSettingsServiceGetPasswordComplexitySettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSettingsServiceGetPasswordComplexitySettingsResponse]: + """GetPasswordComplexitySettings + + Get the password complexity settings + + :param beta_settings_service_get_password_complexity_settings_request: (required) + :type beta_settings_service_get_password_complexity_settings_request: BetaSettingsServiceGetPasswordComplexitySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_password_complexity_settings_serialize( + beta_settings_service_get_password_complexity_settings_request=beta_settings_service_get_password_complexity_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetPasswordComplexitySettingsResponse", + } + 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 get_password_complexity_settings_without_preload_content( + self, + beta_settings_service_get_password_complexity_settings_request: BetaSettingsServiceGetPasswordComplexitySettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetPasswordComplexitySettings + + Get the password complexity settings + + :param beta_settings_service_get_password_complexity_settings_request: (required) + :type beta_settings_service_get_password_complexity_settings_request: BetaSettingsServiceGetPasswordComplexitySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_password_complexity_settings_serialize( + beta_settings_service_get_password_complexity_settings_request=beta_settings_service_get_password_complexity_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetPasswordComplexitySettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_password_complexity_settings_serialize( + self, + beta_settings_service_get_password_complexity_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_password_complexity_settings_request is not None: + _body_params = beta_settings_service_get_password_complexity_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetPasswordComplexitySettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_password_expiry_settings( + self, + beta_settings_service_get_password_expiry_settings_request: BetaSettingsServiceGetPasswordExpirySettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSettingsServiceGetPasswordExpirySettingsResponse: + """GetPasswordExpirySettings + + Get the password expiry settings + + :param beta_settings_service_get_password_expiry_settings_request: (required) + :type beta_settings_service_get_password_expiry_settings_request: BetaSettingsServiceGetPasswordExpirySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_password_expiry_settings_serialize( + beta_settings_service_get_password_expiry_settings_request=beta_settings_service_get_password_expiry_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetPasswordExpirySettingsResponse", + } + 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 get_password_expiry_settings_with_http_info( + self, + beta_settings_service_get_password_expiry_settings_request: BetaSettingsServiceGetPasswordExpirySettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSettingsServiceGetPasswordExpirySettingsResponse]: + """GetPasswordExpirySettings + + Get the password expiry settings + + :param beta_settings_service_get_password_expiry_settings_request: (required) + :type beta_settings_service_get_password_expiry_settings_request: BetaSettingsServiceGetPasswordExpirySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_password_expiry_settings_serialize( + beta_settings_service_get_password_expiry_settings_request=beta_settings_service_get_password_expiry_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetPasswordExpirySettingsResponse", + } + 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 get_password_expiry_settings_without_preload_content( + self, + beta_settings_service_get_password_expiry_settings_request: BetaSettingsServiceGetPasswordExpirySettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetPasswordExpirySettings + + Get the password expiry settings + + :param beta_settings_service_get_password_expiry_settings_request: (required) + :type beta_settings_service_get_password_expiry_settings_request: BetaSettingsServiceGetPasswordExpirySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_password_expiry_settings_serialize( + beta_settings_service_get_password_expiry_settings_request=beta_settings_service_get_password_expiry_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetPasswordExpirySettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_password_expiry_settings_serialize( + self, + beta_settings_service_get_password_expiry_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_password_expiry_settings_request is not None: + _body_params = beta_settings_service_get_password_expiry_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetPasswordExpirySettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_security_settings( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSettingsServiceGetSecuritySettingsResponse: + """GetSecuritySettings + + Get the security settings + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_security_settings_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetSecuritySettingsResponse", + } + 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 get_security_settings_with_http_info( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSettingsServiceGetSecuritySettingsResponse]: + """GetSecuritySettings + + Get the security settings + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_security_settings_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetSecuritySettingsResponse", + } + 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 get_security_settings_without_preload_content( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetSecuritySettings + + Get the security settings + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_security_settings_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetSecuritySettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_security_settings_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetSecuritySettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_security_settings( + self, + beta_settings_service_set_security_settings_request: BetaSettingsServiceSetSecuritySettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaSettingsServiceSetSecuritySettingsResponse: + """SetSecuritySettings + + Set the security settings + + :param beta_settings_service_set_security_settings_request: (required) + :type beta_settings_service_set_security_settings_request: BetaSettingsServiceSetSecuritySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_security_settings_serialize( + beta_settings_service_set_security_settings_request=beta_settings_service_set_security_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceSetSecuritySettingsResponse", + } + 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 set_security_settings_with_http_info( + self, + beta_settings_service_set_security_settings_request: BetaSettingsServiceSetSecuritySettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaSettingsServiceSetSecuritySettingsResponse]: + """SetSecuritySettings + + Set the security settings + + :param beta_settings_service_set_security_settings_request: (required) + :type beta_settings_service_set_security_settings_request: BetaSettingsServiceSetSecuritySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_security_settings_serialize( + beta_settings_service_set_security_settings_request=beta_settings_service_set_security_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceSetSecuritySettingsResponse", + } + 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 set_security_settings_without_preload_content( + self, + beta_settings_service_set_security_settings_request: BetaSettingsServiceSetSecuritySettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """SetSecuritySettings + + Set the security settings + + :param beta_settings_service_set_security_settings_request: (required) + :type beta_settings_service_set_security_settings_request: BetaSettingsServiceSetSecuritySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_security_settings_serialize( + beta_settings_service_set_security_settings_request=beta_settings_service_set_security_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceSetSecuritySettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_security_settings_serialize( + self, + beta_settings_service_set_security_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_set_security_settings_request is not None: + _body_params = beta_settings_service_set_security_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/SetSecuritySettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_user_service_api.py b/zitadel_client/api/beta_user_service_api.py new file mode 100644 index 00000000..5e7823b0 --- /dev/null +++ b/zitadel_client/api/beta_user_service_api.py @@ -0,0 +1,9663 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_user_service_add_human_user_request import BetaUserServiceAddHumanUserRequest +from zitadel_client.models.beta_user_service_add_human_user_response import BetaUserServiceAddHumanUserResponse +from zitadel_client.models.beta_user_service_add_idp_link_request import BetaUserServiceAddIDPLinkRequest +from zitadel_client.models.beta_user_service_add_idp_link_response import BetaUserServiceAddIDPLinkResponse +from zitadel_client.models.beta_user_service_add_otp_email_request import BetaUserServiceAddOTPEmailRequest +from zitadel_client.models.beta_user_service_add_otp_email_response import BetaUserServiceAddOTPEmailResponse +from zitadel_client.models.beta_user_service_add_otpsms_request import BetaUserServiceAddOTPSMSRequest +from zitadel_client.models.beta_user_service_add_otpsms_response import BetaUserServiceAddOTPSMSResponse +from zitadel_client.models.beta_user_service_create_passkey_registration_link_request import BetaUserServiceCreatePasskeyRegistrationLinkRequest +from zitadel_client.models.beta_user_service_create_passkey_registration_link_response import BetaUserServiceCreatePasskeyRegistrationLinkResponse +from zitadel_client.models.beta_user_service_deactivate_user_request import BetaUserServiceDeactivateUserRequest +from zitadel_client.models.beta_user_service_deactivate_user_response import BetaUserServiceDeactivateUserResponse +from zitadel_client.models.beta_user_service_delete_user_request import BetaUserServiceDeleteUserRequest +from zitadel_client.models.beta_user_service_delete_user_response import BetaUserServiceDeleteUserResponse +from zitadel_client.models.beta_user_service_get_user_by_id_request import BetaUserServiceGetUserByIDRequest +from zitadel_client.models.beta_user_service_get_user_by_id_response import BetaUserServiceGetUserByIDResponse +from zitadel_client.models.beta_user_service_list_authentication_method_types_request import BetaUserServiceListAuthenticationMethodTypesRequest +from zitadel_client.models.beta_user_service_list_authentication_method_types_response import BetaUserServiceListAuthenticationMethodTypesResponse +from zitadel_client.models.beta_user_service_list_users_request import BetaUserServiceListUsersRequest +from zitadel_client.models.beta_user_service_list_users_response import BetaUserServiceListUsersResponse +from zitadel_client.models.beta_user_service_lock_user_request import BetaUserServiceLockUserRequest +from zitadel_client.models.beta_user_service_lock_user_response import BetaUserServiceLockUserResponse +from zitadel_client.models.beta_user_service_password_reset_request import BetaUserServicePasswordResetRequest +from zitadel_client.models.beta_user_service_password_reset_response import BetaUserServicePasswordResetResponse +from zitadel_client.models.beta_user_service_reactivate_user_request import BetaUserServiceReactivateUserRequest +from zitadel_client.models.beta_user_service_reactivate_user_response import BetaUserServiceReactivateUserResponse +from zitadel_client.models.beta_user_service_register_passkey_request import BetaUserServiceRegisterPasskeyRequest +from zitadel_client.models.beta_user_service_register_passkey_response import BetaUserServiceRegisterPasskeyResponse +from zitadel_client.models.beta_user_service_register_totp_request import BetaUserServiceRegisterTOTPRequest +from zitadel_client.models.beta_user_service_register_totp_response import BetaUserServiceRegisterTOTPResponse +from zitadel_client.models.beta_user_service_register_u2_f_request import BetaUserServiceRegisterU2FRequest +from zitadel_client.models.beta_user_service_register_u2_f_response import BetaUserServiceRegisterU2FResponse +from zitadel_client.models.beta_user_service_remove_otp_email_request import BetaUserServiceRemoveOTPEmailRequest +from zitadel_client.models.beta_user_service_remove_otp_email_response import BetaUserServiceRemoveOTPEmailResponse +from zitadel_client.models.beta_user_service_remove_otpsms_request import BetaUserServiceRemoveOTPSMSRequest +from zitadel_client.models.beta_user_service_remove_otpsms_response import BetaUserServiceRemoveOTPSMSResponse +from zitadel_client.models.beta_user_service_remove_phone_request import BetaUserServiceRemovePhoneRequest +from zitadel_client.models.beta_user_service_remove_phone_response import BetaUserServiceRemovePhoneResponse +from zitadel_client.models.beta_user_service_remove_totp_request import BetaUserServiceRemoveTOTPRequest +from zitadel_client.models.beta_user_service_remove_totp_response import BetaUserServiceRemoveTOTPResponse +from zitadel_client.models.beta_user_service_resend_email_code_request import BetaUserServiceResendEmailCodeRequest +from zitadel_client.models.beta_user_service_resend_email_code_response import BetaUserServiceResendEmailCodeResponse +from zitadel_client.models.beta_user_service_resend_phone_code_request import BetaUserServiceResendPhoneCodeRequest +from zitadel_client.models.beta_user_service_resend_phone_code_response import BetaUserServiceResendPhoneCodeResponse +from zitadel_client.models.beta_user_service_retrieve_identity_provider_intent_request import BetaUserServiceRetrieveIdentityProviderIntentRequest +from zitadel_client.models.beta_user_service_retrieve_identity_provider_intent_response import BetaUserServiceRetrieveIdentityProviderIntentResponse +from zitadel_client.models.beta_user_service_set_email_request import BetaUserServiceSetEmailRequest +from zitadel_client.models.beta_user_service_set_email_response import BetaUserServiceSetEmailResponse +from zitadel_client.models.beta_user_service_set_password_request import BetaUserServiceSetPasswordRequest +from zitadel_client.models.beta_user_service_set_password_response import BetaUserServiceSetPasswordResponse +from zitadel_client.models.beta_user_service_set_phone_request import BetaUserServiceSetPhoneRequest +from zitadel_client.models.beta_user_service_set_phone_response import BetaUserServiceSetPhoneResponse +from zitadel_client.models.beta_user_service_start_identity_provider_intent_request import BetaUserServiceStartIdentityProviderIntentRequest +from zitadel_client.models.beta_user_service_start_identity_provider_intent_response import BetaUserServiceStartIdentityProviderIntentResponse +from zitadel_client.models.beta_user_service_unlock_user_request import BetaUserServiceUnlockUserRequest +from zitadel_client.models.beta_user_service_unlock_user_response import BetaUserServiceUnlockUserResponse +from zitadel_client.models.beta_user_service_update_human_user_request import BetaUserServiceUpdateHumanUserRequest +from zitadel_client.models.beta_user_service_update_human_user_response import BetaUserServiceUpdateHumanUserResponse +from zitadel_client.models.beta_user_service_verify_email_request import BetaUserServiceVerifyEmailRequest +from zitadel_client.models.beta_user_service_verify_email_response import BetaUserServiceVerifyEmailResponse +from zitadel_client.models.beta_user_service_verify_passkey_registration_request import BetaUserServiceVerifyPasskeyRegistrationRequest +from zitadel_client.models.beta_user_service_verify_passkey_registration_response import BetaUserServiceVerifyPasskeyRegistrationResponse +from zitadel_client.models.beta_user_service_verify_phone_request import BetaUserServiceVerifyPhoneRequest +from zitadel_client.models.beta_user_service_verify_phone_response import BetaUserServiceVerifyPhoneResponse +from zitadel_client.models.beta_user_service_verify_totp_registration_request import BetaUserServiceVerifyTOTPRegistrationRequest +from zitadel_client.models.beta_user_service_verify_totp_registration_response import BetaUserServiceVerifyTOTPRegistrationResponse +from zitadel_client.models.beta_user_service_verify_u2_f_registration_request import BetaUserServiceVerifyU2FRegistrationRequest +from zitadel_client.models.beta_user_service_verify_u2_f_registration_response import BetaUserServiceVerifyU2FRegistrationResponse +from zitadel_client.models.no_op200_response9 import NoOp200Response9 + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaUserServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def add_human_user( + self, + beta_user_service_add_human_user_request: BetaUserServiceAddHumanUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceAddHumanUserResponse: + """AddHumanUser + + Create a new human 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA) + + :param beta_user_service_add_human_user_request: (required) + :type beta_user_service_add_human_user_request: BetaUserServiceAddHumanUserRequest + :param _request_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._add_human_user_serialize( + beta_user_service_add_human_user_request=beta_user_service_add_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': "BetaUserServiceAddHumanUserResponse", + } + 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 add_human_user_with_http_info( + self, + beta_user_service_add_human_user_request: BetaUserServiceAddHumanUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceAddHumanUserResponse]: + """AddHumanUser + + Create a new human 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA) + + :param beta_user_service_add_human_user_request: (required) + :type beta_user_service_add_human_user_request: BetaUserServiceAddHumanUserRequest + :param _request_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._add_human_user_serialize( + beta_user_service_add_human_user_request=beta_user_service_add_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': "BetaUserServiceAddHumanUserResponse", + } + 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 add_human_user_without_preload_content( + self, + beta_user_service_add_human_user_request: BetaUserServiceAddHumanUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """AddHumanUser + + Create a new human 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA) + + :param beta_user_service_add_human_user_request: (required) + :type beta_user_service_add_human_user_request: BetaUserServiceAddHumanUserRequest + :param _request_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._add_human_user_serialize( + beta_user_service_add_human_user_request=beta_user_service_add_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': "BetaUserServiceAddHumanUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_human_user_serialize( + self, + beta_user_service_add_human_user_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 beta_user_service_add_human_user_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/AddHumanUser', + 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 add_idp_link( + self, + beta_user_service_add_idp_link_request: BetaUserServiceAddIDPLinkRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceAddIDPLinkResponse: + """AddIDPLink + + Add link to an identity provider to an user Add link to an identity provider to an user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_add_idp_link_request: (required) + :type beta_user_service_add_idp_link_request: BetaUserServiceAddIDPLinkRequest + :param _request_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._add_idp_link_serialize( + beta_user_service_add_idp_link_request=beta_user_service_add_idp_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceAddIDPLinkResponse", + } + 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 add_idp_link_with_http_info( + self, + beta_user_service_add_idp_link_request: BetaUserServiceAddIDPLinkRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceAddIDPLinkResponse]: + """AddIDPLink + + Add link to an identity provider to an user Add link to an identity provider to an user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_add_idp_link_request: (required) + :type beta_user_service_add_idp_link_request: BetaUserServiceAddIDPLinkRequest + :param _request_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._add_idp_link_serialize( + beta_user_service_add_idp_link_request=beta_user_service_add_idp_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceAddIDPLinkResponse", + } + 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 add_idp_link_without_preload_content( + self, + beta_user_service_add_idp_link_request: BetaUserServiceAddIDPLinkRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """AddIDPLink + + Add link to an identity provider to an user Add link to an identity provider to an user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_add_idp_link_request: (required) + :type beta_user_service_add_idp_link_request: BetaUserServiceAddIDPLinkRequest + :param _request_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._add_idp_link_serialize( + beta_user_service_add_idp_link_request=beta_user_service_add_idp_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceAddIDPLinkResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_idp_link_serialize( + self, + beta_user_service_add_idp_link_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 beta_user_service_add_idp_link_request is not None: + _body_params = beta_user_service_add_idp_link_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/AddIDPLink', + 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 add_otp_email( + self, + beta_user_service_add_otp_email_request: BetaUserServiceAddOTPEmailRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceAddOTPEmailResponse: + """AddOTPEmail + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_add_otp_email_request: (required) + :type beta_user_service_add_otp_email_request: BetaUserServiceAddOTPEmailRequest + :param _request_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._add_otp_email_serialize( + beta_user_service_add_otp_email_request=beta_user_service_add_otp_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceAddOTPEmailResponse", + } + 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 add_otp_email_with_http_info( + self, + beta_user_service_add_otp_email_request: BetaUserServiceAddOTPEmailRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceAddOTPEmailResponse]: + """AddOTPEmail + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_add_otp_email_request: (required) + :type beta_user_service_add_otp_email_request: BetaUserServiceAddOTPEmailRequest + :param _request_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._add_otp_email_serialize( + beta_user_service_add_otp_email_request=beta_user_service_add_otp_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceAddOTPEmailResponse", + } + 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 add_otp_email_without_preload_content( + self, + beta_user_service_add_otp_email_request: BetaUserServiceAddOTPEmailRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """AddOTPEmail + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_add_otp_email_request: (required) + :type beta_user_service_add_otp_email_request: BetaUserServiceAddOTPEmailRequest + :param _request_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._add_otp_email_serialize( + beta_user_service_add_otp_email_request=beta_user_service_add_otp_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceAddOTPEmailResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_otp_email_serialize( + self, + beta_user_service_add_otp_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_add_otp_email_request is not None: + _body_params = beta_user_service_add_otp_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='/zitadel.user.v2beta.UserService/AddOTPEmail', + 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 add_otpsms( + self, + beta_user_service_add_otpsms_request: BetaUserServiceAddOTPSMSRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceAddOTPSMSResponse: + """AddOTPSMS + + Add OTP SMS for a 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_add_otpsms_request: (required) + :type beta_user_service_add_otpsms_request: BetaUserServiceAddOTPSMSRequest + :param _request_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._add_otpsms_serialize( + beta_user_service_add_otpsms_request=beta_user_service_add_otpsms_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceAddOTPSMSResponse", + } + 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 add_otpsms_with_http_info( + self, + beta_user_service_add_otpsms_request: BetaUserServiceAddOTPSMSRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceAddOTPSMSResponse]: + """AddOTPSMS + + Add OTP SMS for a 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_add_otpsms_request: (required) + :type beta_user_service_add_otpsms_request: BetaUserServiceAddOTPSMSRequest + :param _request_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._add_otpsms_serialize( + beta_user_service_add_otpsms_request=beta_user_service_add_otpsms_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceAddOTPSMSResponse", + } + 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 add_otpsms_without_preload_content( + self, + beta_user_service_add_otpsms_request: BetaUserServiceAddOTPSMSRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """AddOTPSMS + + Add OTP SMS for a 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_add_otpsms_request: (required) + :type beta_user_service_add_otpsms_request: BetaUserServiceAddOTPSMSRequest + :param _request_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._add_otpsms_serialize( + beta_user_service_add_otpsms_request=beta_user_service_add_otpsms_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceAddOTPSMSResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_otpsms_serialize( + self, + beta_user_service_add_otpsms_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 beta_user_service_add_otpsms_request is not None: + _body_params = beta_user_service_add_otpsms_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/AddOTPSMS', + 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 create_passkey_registration_link( + self, + beta_user_service_create_passkey_registration_link_request: BetaUserServiceCreatePasskeyRegistrationLinkRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceCreatePasskeyRegistrationLinkResponse: + """CreatePasskeyRegistrationLink + + Create a passkey registration link for a user Create a passkey registration link which includes a code and either return it or send it to the user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_create_passkey_registration_link_request: (required) + :type beta_user_service_create_passkey_registration_link_request: BetaUserServiceCreatePasskeyRegistrationLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_passkey_registration_link_serialize( + beta_user_service_create_passkey_registration_link_request=beta_user_service_create_passkey_registration_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceCreatePasskeyRegistrationLinkResponse", + } + 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 create_passkey_registration_link_with_http_info( + self, + beta_user_service_create_passkey_registration_link_request: BetaUserServiceCreatePasskeyRegistrationLinkRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceCreatePasskeyRegistrationLinkResponse]: + """CreatePasskeyRegistrationLink + + Create a passkey registration link for a user Create a passkey registration link which includes a code and either return it or send it to the user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_create_passkey_registration_link_request: (required) + :type beta_user_service_create_passkey_registration_link_request: BetaUserServiceCreatePasskeyRegistrationLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_passkey_registration_link_serialize( + beta_user_service_create_passkey_registration_link_request=beta_user_service_create_passkey_registration_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceCreatePasskeyRegistrationLinkResponse", + } + 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 create_passkey_registration_link_without_preload_content( + self, + beta_user_service_create_passkey_registration_link_request: BetaUserServiceCreatePasskeyRegistrationLinkRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """CreatePasskeyRegistrationLink + + Create a passkey registration link for a user Create a passkey registration link which includes a code and either return it or send it to the user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_create_passkey_registration_link_request: (required) + :type beta_user_service_create_passkey_registration_link_request: BetaUserServiceCreatePasskeyRegistrationLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_passkey_registration_link_serialize( + beta_user_service_create_passkey_registration_link_request=beta_user_service_create_passkey_registration_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceCreatePasskeyRegistrationLinkResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_passkey_registration_link_serialize( + self, + beta_user_service_create_passkey_registration_link_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 beta_user_service_create_passkey_registration_link_request is not None: + _body_params = beta_user_service_create_passkey_registration_link_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/CreatePasskeyRegistrationLink', + 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 deactivate_user( + self, + beta_user_service_deactivate_user_request: BetaUserServiceDeactivateUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceDeactivateUserResponse: + """DeactivateUser + + Deactivate 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_deactivate_user_request: (required) + :type beta_user_service_deactivate_user_request: BetaUserServiceDeactivateUserRequest + :param _request_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._deactivate_user_serialize( + beta_user_service_deactivate_user_request=beta_user_service_deactivate_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceDeactivateUserResponse", + } + 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 deactivate_user_with_http_info( + self, + beta_user_service_deactivate_user_request: BetaUserServiceDeactivateUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceDeactivateUserResponse]: + """DeactivateUser + + Deactivate 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_deactivate_user_request: (required) + :type beta_user_service_deactivate_user_request: BetaUserServiceDeactivateUserRequest + :param _request_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._deactivate_user_serialize( + beta_user_service_deactivate_user_request=beta_user_service_deactivate_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceDeactivateUserResponse", + } + 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 deactivate_user_without_preload_content( + self, + beta_user_service_deactivate_user_request: BetaUserServiceDeactivateUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """DeactivateUser + + Deactivate 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_deactivate_user_request: (required) + :type beta_user_service_deactivate_user_request: BetaUserServiceDeactivateUserRequest + :param _request_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._deactivate_user_serialize( + beta_user_service_deactivate_user_request=beta_user_service_deactivate_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceDeactivateUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _deactivate_user_serialize( + self, + beta_user_service_deactivate_user_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 beta_user_service_deactivate_user_request is not None: + _body_params = beta_user_service_deactivate_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='/zitadel.user.v2beta.UserService/DeactivateUser', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_user( + self, + beta_user_service_delete_user_request: BetaUserServiceDeleteUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceDeleteUserResponse: + """DeleteUser + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_delete_user_request: (required) + :type beta_user_service_delete_user_request: BetaUserServiceDeleteUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_user_serialize( + beta_user_service_delete_user_request=beta_user_service_delete_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceDeleteUserResponse", + } + 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 delete_user_with_http_info( + self, + beta_user_service_delete_user_request: BetaUserServiceDeleteUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceDeleteUserResponse]: + """DeleteUser + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_delete_user_request: (required) + :type beta_user_service_delete_user_request: BetaUserServiceDeleteUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_user_serialize( + beta_user_service_delete_user_request=beta_user_service_delete_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceDeleteUserResponse", + } + 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 delete_user_without_preload_content( + self, + beta_user_service_delete_user_request: BetaUserServiceDeleteUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """DeleteUser + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_delete_user_request: (required) + :type beta_user_service_delete_user_request: BetaUserServiceDeleteUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_user_serialize( + beta_user_service_delete_user_request=beta_user_service_delete_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceDeleteUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_user_serialize( + self, + beta_user_service_delete_user_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 beta_user_service_delete_user_request is not None: + _body_params = beta_user_service_delete_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='/zitadel.user.v2beta.UserService/DeleteUser', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_user_by_id( + self, + beta_user_service_get_user_by_id_request: BetaUserServiceGetUserByIDRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceGetUserByIDResponse: + """GetUserByID + + User by ID Returns the full user object (human or machine) including the profile, email, etc. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_get_user_by_id_request: (required) + :type beta_user_service_get_user_by_id_request: BetaUserServiceGetUserByIDRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_by_id_serialize( + beta_user_service_get_user_by_id_request=beta_user_service_get_user_by_id_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceGetUserByIDResponse", + } + 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 get_user_by_id_with_http_info( + self, + beta_user_service_get_user_by_id_request: BetaUserServiceGetUserByIDRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceGetUserByIDResponse]: + """GetUserByID + + User by ID Returns the full user object (human or machine) including the profile, email, etc. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_get_user_by_id_request: (required) + :type beta_user_service_get_user_by_id_request: BetaUserServiceGetUserByIDRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_by_id_serialize( + beta_user_service_get_user_by_id_request=beta_user_service_get_user_by_id_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceGetUserByIDResponse", + } + 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 get_user_by_id_without_preload_content( + self, + beta_user_service_get_user_by_id_request: BetaUserServiceGetUserByIDRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """GetUserByID + + User by ID Returns the full user object (human or machine) including the profile, email, etc. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_get_user_by_id_request: (required) + :type beta_user_service_get_user_by_id_request: BetaUserServiceGetUserByIDRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_by_id_serialize( + beta_user_service_get_user_by_id_request=beta_user_service_get_user_by_id_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceGetUserByIDResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_by_id_serialize( + self, + beta_user_service_get_user_by_id_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 beta_user_service_get_user_by_id_request is not None: + _body_params = beta_user_service_get_user_by_id_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/GetUserByID', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_authentication_method_types( + self, + beta_user_service_list_authentication_method_types_request: BetaUserServiceListAuthenticationMethodTypesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceListAuthenticationMethodTypesResponse: + """ListAuthenticationMethodTypes + + List all possible authentication methods of a user List all possible authentication methods of a user like password, passwordless, (T)OTP and more. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_list_authentication_method_types_request: (required) + :type beta_user_service_list_authentication_method_types_request: BetaUserServiceListAuthenticationMethodTypesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_authentication_method_types_serialize( + beta_user_service_list_authentication_method_types_request=beta_user_service_list_authentication_method_types_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceListAuthenticationMethodTypesResponse", + } + 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 list_authentication_method_types_with_http_info( + self, + beta_user_service_list_authentication_method_types_request: BetaUserServiceListAuthenticationMethodTypesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceListAuthenticationMethodTypesResponse]: + """ListAuthenticationMethodTypes + + List all possible authentication methods of a user List all possible authentication methods of a user like password, passwordless, (T)OTP and more. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_list_authentication_method_types_request: (required) + :type beta_user_service_list_authentication_method_types_request: BetaUserServiceListAuthenticationMethodTypesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_authentication_method_types_serialize( + beta_user_service_list_authentication_method_types_request=beta_user_service_list_authentication_method_types_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceListAuthenticationMethodTypesResponse", + } + 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 list_authentication_method_types_without_preload_content( + self, + beta_user_service_list_authentication_method_types_request: BetaUserServiceListAuthenticationMethodTypesRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """ListAuthenticationMethodTypes + + List all possible authentication methods of a user List all possible authentication methods of a user like password, passwordless, (T)OTP and more. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_list_authentication_method_types_request: (required) + :type beta_user_service_list_authentication_method_types_request: BetaUserServiceListAuthenticationMethodTypesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_authentication_method_types_serialize( + beta_user_service_list_authentication_method_types_request=beta_user_service_list_authentication_method_types_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceListAuthenticationMethodTypesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_authentication_method_types_serialize( + self, + beta_user_service_list_authentication_method_types_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 beta_user_service_list_authentication_method_types_request is not None: + _body_params = beta_user_service_list_authentication_method_types_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/ListAuthenticationMethodTypes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_users( + self, + beta_user_service_list_users_request: BetaUserServiceListUsersRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceListUsersResponse: + """ListUsers + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_list_users_request: (required) + :type beta_user_service_list_users_request: BetaUserServiceListUsersRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_users_serialize( + beta_user_service_list_users_request=beta_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': "BetaUserServiceListUsersResponse", + } + 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 list_users_with_http_info( + self, + beta_user_service_list_users_request: BetaUserServiceListUsersRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceListUsersResponse]: + """ListUsers + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_list_users_request: (required) + :type beta_user_service_list_users_request: BetaUserServiceListUsersRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_users_serialize( + beta_user_service_list_users_request=beta_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': "BetaUserServiceListUsersResponse", + } + 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 list_users_without_preload_content( + self, + beta_user_service_list_users_request: BetaUserServiceListUsersRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """ListUsers + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_list_users_request: (required) + :type beta_user_service_list_users_request: BetaUserServiceListUsersRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_users_serialize( + beta_user_service_list_users_request=beta_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': "BetaUserServiceListUsersResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_users_serialize( + self, + beta_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 beta_user_service_list_users_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/ListUsers', + 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 lock_user( + self, + beta_user_service_lock_user_request: BetaUserServiceLockUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceLockUserResponse: + """LockUser + + 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.). Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_lock_user_request: (required) + :type beta_user_service_lock_user_request: BetaUserServiceLockUserRequest + :param _request_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._lock_user_serialize( + beta_user_service_lock_user_request=beta_user_service_lock_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceLockUserResponse", + } + 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 lock_user_with_http_info( + self, + beta_user_service_lock_user_request: BetaUserServiceLockUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceLockUserResponse]: + """LockUser + + 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.). Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_lock_user_request: (required) + :type beta_user_service_lock_user_request: BetaUserServiceLockUserRequest + :param _request_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._lock_user_serialize( + beta_user_service_lock_user_request=beta_user_service_lock_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceLockUserResponse", + } + 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 lock_user_without_preload_content( + self, + beta_user_service_lock_user_request: BetaUserServiceLockUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """LockUser + + 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.). Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_lock_user_request: (required) + :type beta_user_service_lock_user_request: BetaUserServiceLockUserRequest + :param _request_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._lock_user_serialize( + beta_user_service_lock_user_request=beta_user_service_lock_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceLockUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _lock_user_serialize( + self, + beta_user_service_lock_user_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 beta_user_service_lock_user_request is not None: + _body_params = beta_user_service_lock_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='/zitadel.user.v2beta.UserService/LockUser', + 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 no_op( + 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, + ) -> NoOp200Response9: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response9", + } + 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 no_op_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[NoOp200Response9]: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response9", + } + 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 no_op_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: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response9", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _no_op_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='/56a395ed', + 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 password_reset( + self, + beta_user_service_password_reset_request: BetaUserServicePasswordResetRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServicePasswordResetResponse: + """PasswordReset + + Request a code to reset a password Request a code to reset a password. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_password_reset_request: (required) + :type beta_user_service_password_reset_request: BetaUserServicePasswordResetRequest + :param _request_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._password_reset_serialize( + beta_user_service_password_reset_request=beta_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': "BetaUserServicePasswordResetResponse", + } + 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 password_reset_with_http_info( + self, + beta_user_service_password_reset_request: BetaUserServicePasswordResetRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServicePasswordResetResponse]: + """PasswordReset + + Request a code to reset a password Request a code to reset a password. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_password_reset_request: (required) + :type beta_user_service_password_reset_request: BetaUserServicePasswordResetRequest + :param _request_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._password_reset_serialize( + beta_user_service_password_reset_request=beta_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': "BetaUserServicePasswordResetResponse", + } + 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 password_reset_without_preload_content( + self, + beta_user_service_password_reset_request: BetaUserServicePasswordResetRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """PasswordReset + + Request a code to reset a password Request a code to reset a password. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_password_reset_request: (required) + :type beta_user_service_password_reset_request: BetaUserServicePasswordResetRequest + :param _request_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._password_reset_serialize( + beta_user_service_password_reset_request=beta_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': "BetaUserServicePasswordResetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _password_reset_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_password_reset_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/PasswordReset', + 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 reactivate_user( + self, + beta_user_service_reactivate_user_request: BetaUserServiceReactivateUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceReactivateUserResponse: + """ReactivateUser + + 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'. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_reactivate_user_request: (required) + :type beta_user_service_reactivate_user_request: BetaUserServiceReactivateUserRequest + :param _request_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._reactivate_user_serialize( + beta_user_service_reactivate_user_request=beta_user_service_reactivate_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceReactivateUserResponse", + } + 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 reactivate_user_with_http_info( + self, + beta_user_service_reactivate_user_request: BetaUserServiceReactivateUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceReactivateUserResponse]: + """ReactivateUser + + 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'. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_reactivate_user_request: (required) + :type beta_user_service_reactivate_user_request: BetaUserServiceReactivateUserRequest + :param _request_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._reactivate_user_serialize( + beta_user_service_reactivate_user_request=beta_user_service_reactivate_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceReactivateUserResponse", + } + 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 reactivate_user_without_preload_content( + self, + beta_user_service_reactivate_user_request: BetaUserServiceReactivateUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """ReactivateUser + + 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'. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_reactivate_user_request: (required) + :type beta_user_service_reactivate_user_request: BetaUserServiceReactivateUserRequest + :param _request_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._reactivate_user_serialize( + beta_user_service_reactivate_user_request=beta_user_service_reactivate_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceReactivateUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reactivate_user_serialize( + self, + beta_user_service_reactivate_user_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 beta_user_service_reactivate_user_request is not None: + _body_params = beta_user_service_reactivate_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='/zitadel.user.v2beta.UserService/ReactivateUser', + 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 register_passkey( + self, + beta_user_service_register_passkey_request: BetaUserServiceRegisterPasskeyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceRegisterPasskeyResponse: + """RegisterPasskey + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_register_passkey_request: (required) + :type beta_user_service_register_passkey_request: BetaUserServiceRegisterPasskeyRequest + :param _request_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._register_passkey_serialize( + beta_user_service_register_passkey_request=beta_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': "BetaUserServiceRegisterPasskeyResponse", + } + 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 register_passkey_with_http_info( + self, + beta_user_service_register_passkey_request: BetaUserServiceRegisterPasskeyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceRegisterPasskeyResponse]: + """RegisterPasskey + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_register_passkey_request: (required) + :type beta_user_service_register_passkey_request: BetaUserServiceRegisterPasskeyRequest + :param _request_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._register_passkey_serialize( + beta_user_service_register_passkey_request=beta_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': "BetaUserServiceRegisterPasskeyResponse", + } + 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 register_passkey_without_preload_content( + self, + beta_user_service_register_passkey_request: BetaUserServiceRegisterPasskeyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """RegisterPasskey + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_register_passkey_request: (required) + :type beta_user_service_register_passkey_request: BetaUserServiceRegisterPasskeyRequest + :param _request_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._register_passkey_serialize( + beta_user_service_register_passkey_request=beta_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': "BetaUserServiceRegisterPasskeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _register_passkey_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_register_passkey_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/RegisterPasskey', + 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 register_totp( + self, + beta_user_service_register_totp_request: BetaUserServiceRegisterTOTPRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceRegisterTOTPResponse: + """RegisterTOTP + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_register_totp_request: (required) + :type beta_user_service_register_totp_request: BetaUserServiceRegisterTOTPRequest + :param _request_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._register_totp_serialize( + beta_user_service_register_totp_request=beta_user_service_register_totp_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRegisterTOTPResponse", + } + 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 register_totp_with_http_info( + self, + beta_user_service_register_totp_request: BetaUserServiceRegisterTOTPRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceRegisterTOTPResponse]: + """RegisterTOTP + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_register_totp_request: (required) + :type beta_user_service_register_totp_request: BetaUserServiceRegisterTOTPRequest + :param _request_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._register_totp_serialize( + beta_user_service_register_totp_request=beta_user_service_register_totp_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRegisterTOTPResponse", + } + 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 register_totp_without_preload_content( + self, + beta_user_service_register_totp_request: BetaUserServiceRegisterTOTPRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """RegisterTOTP + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_register_totp_request: (required) + :type beta_user_service_register_totp_request: BetaUserServiceRegisterTOTPRequest + :param _request_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._register_totp_serialize( + beta_user_service_register_totp_request=beta_user_service_register_totp_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRegisterTOTPResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _register_totp_serialize( + self, + beta_user_service_register_totp_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 beta_user_service_register_totp_request is not None: + _body_params = beta_user_service_register_totp_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/RegisterTOTP', + 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 register_u2_f( + self, + beta_user_service_register_u2_f_request: BetaUserServiceRegisterU2FRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceRegisterU2FResponse: + """RegisterU2F + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_register_u2_f_request: (required) + :type beta_user_service_register_u2_f_request: BetaUserServiceRegisterU2FRequest + :param _request_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._register_u2_f_serialize( + beta_user_service_register_u2_f_request=beta_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': "BetaUserServiceRegisterU2FResponse", + } + 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 register_u2_f_with_http_info( + self, + beta_user_service_register_u2_f_request: BetaUserServiceRegisterU2FRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceRegisterU2FResponse]: + """RegisterU2F + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_register_u2_f_request: (required) + :type beta_user_service_register_u2_f_request: BetaUserServiceRegisterU2FRequest + :param _request_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._register_u2_f_serialize( + beta_user_service_register_u2_f_request=beta_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': "BetaUserServiceRegisterU2FResponse", + } + 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 register_u2_f_without_preload_content( + self, + beta_user_service_register_u2_f_request: BetaUserServiceRegisterU2FRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """RegisterU2F + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_register_u2_f_request: (required) + :type beta_user_service_register_u2_f_request: BetaUserServiceRegisterU2FRequest + :param _request_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._register_u2_f_serialize( + beta_user_service_register_u2_f_request=beta_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': "BetaUserServiceRegisterU2FResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _register_u2_f_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_register_u2_f_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/RegisterU2F', + 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 remove_otp_email( + self, + beta_user_service_remove_otp_email_request: BetaUserServiceRemoveOTPEmailRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceRemoveOTPEmailResponse: + """RemoveOTPEmail + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_otp_email_request: (required) + :type beta_user_service_remove_otp_email_request: BetaUserServiceRemoveOTPEmailRequest + :param _request_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._remove_otp_email_serialize( + beta_user_service_remove_otp_email_request=beta_user_service_remove_otp_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemoveOTPEmailResponse", + } + 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 remove_otp_email_with_http_info( + self, + beta_user_service_remove_otp_email_request: BetaUserServiceRemoveOTPEmailRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceRemoveOTPEmailResponse]: + """RemoveOTPEmail + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_otp_email_request: (required) + :type beta_user_service_remove_otp_email_request: BetaUserServiceRemoveOTPEmailRequest + :param _request_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._remove_otp_email_serialize( + beta_user_service_remove_otp_email_request=beta_user_service_remove_otp_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemoveOTPEmailResponse", + } + 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 remove_otp_email_without_preload_content( + self, + beta_user_service_remove_otp_email_request: BetaUserServiceRemoveOTPEmailRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """RemoveOTPEmail + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_otp_email_request: (required) + :type beta_user_service_remove_otp_email_request: BetaUserServiceRemoveOTPEmailRequest + :param _request_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._remove_otp_email_serialize( + beta_user_service_remove_otp_email_request=beta_user_service_remove_otp_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemoveOTPEmailResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_otp_email_serialize( + self, + beta_user_service_remove_otp_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_remove_otp_email_request is not None: + _body_params = beta_user_service_remove_otp_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='/zitadel.user.v2beta.UserService/RemoveOTPEmail', + 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 remove_otpsms( + self, + beta_user_service_remove_otpsms_request: BetaUserServiceRemoveOTPSMSRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceRemoveOTPSMSResponse: + """RemoveOTPSMS + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_otpsms_request: (required) + :type beta_user_service_remove_otpsms_request: BetaUserServiceRemoveOTPSMSRequest + :param _request_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._remove_otpsms_serialize( + beta_user_service_remove_otpsms_request=beta_user_service_remove_otpsms_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemoveOTPSMSResponse", + } + 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 remove_otpsms_with_http_info( + self, + beta_user_service_remove_otpsms_request: BetaUserServiceRemoveOTPSMSRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceRemoveOTPSMSResponse]: + """RemoveOTPSMS + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_otpsms_request: (required) + :type beta_user_service_remove_otpsms_request: BetaUserServiceRemoveOTPSMSRequest + :param _request_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._remove_otpsms_serialize( + beta_user_service_remove_otpsms_request=beta_user_service_remove_otpsms_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemoveOTPSMSResponse", + } + 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 remove_otpsms_without_preload_content( + self, + beta_user_service_remove_otpsms_request: BetaUserServiceRemoveOTPSMSRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """RemoveOTPSMS + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_otpsms_request: (required) + :type beta_user_service_remove_otpsms_request: BetaUserServiceRemoveOTPSMSRequest + :param _request_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._remove_otpsms_serialize( + beta_user_service_remove_otpsms_request=beta_user_service_remove_otpsms_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemoveOTPSMSResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_otpsms_serialize( + self, + beta_user_service_remove_otpsms_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 beta_user_service_remove_otpsms_request is not None: + _body_params = beta_user_service_remove_otpsms_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/RemoveOTPSMS', + 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 remove_phone( + self, + beta_user_service_remove_phone_request: BetaUserServiceRemovePhoneRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceRemovePhoneResponse: + """RemovePhone + + Remove the user phone Remove the user phone Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_phone_request: (required) + :type beta_user_service_remove_phone_request: BetaUserServiceRemovePhoneRequest + :param _request_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._remove_phone_serialize( + beta_user_service_remove_phone_request=beta_user_service_remove_phone_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemovePhoneResponse", + } + 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 remove_phone_with_http_info( + self, + beta_user_service_remove_phone_request: BetaUserServiceRemovePhoneRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceRemovePhoneResponse]: + """RemovePhone + + Remove the user phone Remove the user phone Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_phone_request: (required) + :type beta_user_service_remove_phone_request: BetaUserServiceRemovePhoneRequest + :param _request_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._remove_phone_serialize( + beta_user_service_remove_phone_request=beta_user_service_remove_phone_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemovePhoneResponse", + } + 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 remove_phone_without_preload_content( + self, + beta_user_service_remove_phone_request: BetaUserServiceRemovePhoneRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """RemovePhone + + Remove the user phone Remove the user phone Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_phone_request: (required) + :type beta_user_service_remove_phone_request: BetaUserServiceRemovePhoneRequest + :param _request_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._remove_phone_serialize( + beta_user_service_remove_phone_request=beta_user_service_remove_phone_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemovePhoneResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_phone_serialize( + self, + beta_user_service_remove_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_remove_phone_request is not None: + _body_params = beta_user_service_remove_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='/zitadel.user.v2beta.UserService/RemovePhone', + 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 remove_totp( + self, + beta_user_service_remove_totp_request: BetaUserServiceRemoveTOTPRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceRemoveTOTPResponse: + """RemoveTOTP + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_totp_request: (required) + :type beta_user_service_remove_totp_request: BetaUserServiceRemoveTOTPRequest + :param _request_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._remove_totp_serialize( + beta_user_service_remove_totp_request=beta_user_service_remove_totp_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemoveTOTPResponse", + } + 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 remove_totp_with_http_info( + self, + beta_user_service_remove_totp_request: BetaUserServiceRemoveTOTPRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceRemoveTOTPResponse]: + """RemoveTOTP + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_totp_request: (required) + :type beta_user_service_remove_totp_request: BetaUserServiceRemoveTOTPRequest + :param _request_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._remove_totp_serialize( + beta_user_service_remove_totp_request=beta_user_service_remove_totp_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemoveTOTPResponse", + } + 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 remove_totp_without_preload_content( + self, + beta_user_service_remove_totp_request: BetaUserServiceRemoveTOTPRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """RemoveTOTP + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_totp_request: (required) + :type beta_user_service_remove_totp_request: BetaUserServiceRemoveTOTPRequest + :param _request_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._remove_totp_serialize( + beta_user_service_remove_totp_request=beta_user_service_remove_totp_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemoveTOTPResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_totp_serialize( + self, + beta_user_service_remove_totp_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 beta_user_service_remove_totp_request is not None: + _body_params = beta_user_service_remove_totp_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/RemoveTOTP', + 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 resend_email_code( + self, + beta_user_service_resend_email_code_request: BetaUserServiceResendEmailCodeRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceResendEmailCodeResponse: + """ResendEmailCode + + Resend code to verify user email Resend code to verify user email Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_resend_email_code_request: (required) + :type beta_user_service_resend_email_code_request: BetaUserServiceResendEmailCodeRequest + :param _request_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._resend_email_code_serialize( + beta_user_service_resend_email_code_request=beta_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': "BetaUserServiceResendEmailCodeResponse", + } + 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 resend_email_code_with_http_info( + self, + beta_user_service_resend_email_code_request: BetaUserServiceResendEmailCodeRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceResendEmailCodeResponse]: + """ResendEmailCode + + Resend code to verify user email Resend code to verify user email Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_resend_email_code_request: (required) + :type beta_user_service_resend_email_code_request: BetaUserServiceResendEmailCodeRequest + :param _request_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._resend_email_code_serialize( + beta_user_service_resend_email_code_request=beta_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': "BetaUserServiceResendEmailCodeResponse", + } + 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 resend_email_code_without_preload_content( + self, + beta_user_service_resend_email_code_request: BetaUserServiceResendEmailCodeRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """ResendEmailCode + + Resend code to verify user email Resend code to verify user email Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_resend_email_code_request: (required) + :type beta_user_service_resend_email_code_request: BetaUserServiceResendEmailCodeRequest + :param _request_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._resend_email_code_serialize( + beta_user_service_resend_email_code_request=beta_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': "BetaUserServiceResendEmailCodeResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _resend_email_code_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_resend_email_code_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/ResendEmailCode', + 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 resend_phone_code( + self, + beta_user_service_resend_phone_code_request: BetaUserServiceResendPhoneCodeRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceResendPhoneCodeResponse: + """ResendPhoneCode + + Resend code to verify user phone Resend code to verify user phone Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_resend_phone_code_request: (required) + :type beta_user_service_resend_phone_code_request: BetaUserServiceResendPhoneCodeRequest + :param _request_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._resend_phone_code_serialize( + beta_user_service_resend_phone_code_request=beta_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': "BetaUserServiceResendPhoneCodeResponse", + } + 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 resend_phone_code_with_http_info( + self, + beta_user_service_resend_phone_code_request: BetaUserServiceResendPhoneCodeRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceResendPhoneCodeResponse]: + """ResendPhoneCode + + Resend code to verify user phone Resend code to verify user phone Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_resend_phone_code_request: (required) + :type beta_user_service_resend_phone_code_request: BetaUserServiceResendPhoneCodeRequest + :param _request_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._resend_phone_code_serialize( + beta_user_service_resend_phone_code_request=beta_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': "BetaUserServiceResendPhoneCodeResponse", + } + 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 resend_phone_code_without_preload_content( + self, + beta_user_service_resend_phone_code_request: BetaUserServiceResendPhoneCodeRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """ResendPhoneCode + + Resend code to verify user phone Resend code to verify user phone Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_resend_phone_code_request: (required) + :type beta_user_service_resend_phone_code_request: BetaUserServiceResendPhoneCodeRequest + :param _request_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._resend_phone_code_serialize( + beta_user_service_resend_phone_code_request=beta_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': "BetaUserServiceResendPhoneCodeResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _resend_phone_code_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_resend_phone_code_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/ResendPhoneCode', + 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 retrieve_identity_provider_intent( + self, + beta_user_service_retrieve_identity_provider_intent_request: BetaUserServiceRetrieveIdentityProviderIntentRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceRetrieveIdentityProviderIntentResponse: + """RetrieveIdentityProviderIntent + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_retrieve_identity_provider_intent_request: (required) + :type beta_user_service_retrieve_identity_provider_intent_request: BetaUserServiceRetrieveIdentityProviderIntentRequest + :param _request_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._retrieve_identity_provider_intent_serialize( + beta_user_service_retrieve_identity_provider_intent_request=beta_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': "BetaUserServiceRetrieveIdentityProviderIntentResponse", + } + 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 retrieve_identity_provider_intent_with_http_info( + self, + beta_user_service_retrieve_identity_provider_intent_request: BetaUserServiceRetrieveIdentityProviderIntentRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceRetrieveIdentityProviderIntentResponse]: + """RetrieveIdentityProviderIntent + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_retrieve_identity_provider_intent_request: (required) + :type beta_user_service_retrieve_identity_provider_intent_request: BetaUserServiceRetrieveIdentityProviderIntentRequest + :param _request_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._retrieve_identity_provider_intent_serialize( + beta_user_service_retrieve_identity_provider_intent_request=beta_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': "BetaUserServiceRetrieveIdentityProviderIntentResponse", + } + 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 retrieve_identity_provider_intent_without_preload_content( + self, + beta_user_service_retrieve_identity_provider_intent_request: BetaUserServiceRetrieveIdentityProviderIntentRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """RetrieveIdentityProviderIntent + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_retrieve_identity_provider_intent_request: (required) + :type beta_user_service_retrieve_identity_provider_intent_request: BetaUserServiceRetrieveIdentityProviderIntentRequest + :param _request_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._retrieve_identity_provider_intent_serialize( + beta_user_service_retrieve_identity_provider_intent_request=beta_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': "BetaUserServiceRetrieveIdentityProviderIntentResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_identity_provider_intent_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_retrieve_identity_provider_intent_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/RetrieveIdentityProviderIntent', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_email( + self, + beta_user_service_set_email_request: BetaUserServiceSetEmailRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceSetEmailResponse: + """SetEmail + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_set_email_request: (required) + :type beta_user_service_set_email_request: BetaUserServiceSetEmailRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_email_serialize( + beta_user_service_set_email_request=beta_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': "BetaUserServiceSetEmailResponse", + } + 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 set_email_with_http_info( + self, + beta_user_service_set_email_request: BetaUserServiceSetEmailRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceSetEmailResponse]: + """SetEmail + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_set_email_request: (required) + :type beta_user_service_set_email_request: BetaUserServiceSetEmailRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_email_serialize( + beta_user_service_set_email_request=beta_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': "BetaUserServiceSetEmailResponse", + } + 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 set_email_without_preload_content( + self, + beta_user_service_set_email_request: BetaUserServiceSetEmailRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """SetEmail + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_set_email_request: (required) + :type beta_user_service_set_email_request: BetaUserServiceSetEmailRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_email_serialize( + beta_user_service_set_email_request=beta_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': "BetaUserServiceSetEmailResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_email_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_set_email_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/SetEmail', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_password( + self, + beta_user_service_set_password_request: BetaUserServiceSetPasswordRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceSetPasswordResponse: + """SetPassword + + Change password Change the password of a user with either a verification code or the current password. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_set_password_request: (required) + :type beta_user_service_set_password_request: BetaUserServiceSetPasswordRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_password_serialize( + beta_user_service_set_password_request=beta_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': "BetaUserServiceSetPasswordResponse", + } + 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 set_password_with_http_info( + self, + beta_user_service_set_password_request: BetaUserServiceSetPasswordRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceSetPasswordResponse]: + """SetPassword + + Change password Change the password of a user with either a verification code or the current password. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_set_password_request: (required) + :type beta_user_service_set_password_request: BetaUserServiceSetPasswordRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_password_serialize( + beta_user_service_set_password_request=beta_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': "BetaUserServiceSetPasswordResponse", + } + 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 set_password_without_preload_content( + self, + beta_user_service_set_password_request: BetaUserServiceSetPasswordRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """SetPassword + + Change password Change the password of a user with either a verification code or the current password. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_set_password_request: (required) + :type beta_user_service_set_password_request: BetaUserServiceSetPasswordRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_password_serialize( + beta_user_service_set_password_request=beta_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': "BetaUserServiceSetPasswordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_password_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_set_password_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/SetPassword', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_phone( + self, + beta_user_service_set_phone_request: BetaUserServiceSetPhoneRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceSetPhoneResponse: + """SetPhone + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_set_phone_request: (required) + :type beta_user_service_set_phone_request: BetaUserServiceSetPhoneRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_phone_serialize( + beta_user_service_set_phone_request=beta_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': "BetaUserServiceSetPhoneResponse", + } + 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 set_phone_with_http_info( + self, + beta_user_service_set_phone_request: BetaUserServiceSetPhoneRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceSetPhoneResponse]: + """SetPhone + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_set_phone_request: (required) + :type beta_user_service_set_phone_request: BetaUserServiceSetPhoneRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_phone_serialize( + beta_user_service_set_phone_request=beta_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': "BetaUserServiceSetPhoneResponse", + } + 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 set_phone_without_preload_content( + self, + beta_user_service_set_phone_request: BetaUserServiceSetPhoneRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """SetPhone + + 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. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_set_phone_request: (required) + :type beta_user_service_set_phone_request: BetaUserServiceSetPhoneRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_phone_serialize( + beta_user_service_set_phone_request=beta_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': "BetaUserServiceSetPhoneResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_phone_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_set_phone_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/SetPhone', + 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 start_identity_provider_intent( + self, + beta_user_service_start_identity_provider_intent_request: BetaUserServiceStartIdentityProviderIntentRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceStartIdentityProviderIntentResponse: + """StartIdentityProviderIntent + + Start flow with an identity provider Start a flow with an identity provider, for external login, registration or linking. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_start_identity_provider_intent_request: (required) + :type beta_user_service_start_identity_provider_intent_request: BetaUserServiceStartIdentityProviderIntentRequest + :param _request_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._start_identity_provider_intent_serialize( + beta_user_service_start_identity_provider_intent_request=beta_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': "BetaUserServiceStartIdentityProviderIntentResponse", + } + 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 start_identity_provider_intent_with_http_info( + self, + beta_user_service_start_identity_provider_intent_request: BetaUserServiceStartIdentityProviderIntentRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceStartIdentityProviderIntentResponse]: + """StartIdentityProviderIntent + + Start flow with an identity provider Start a flow with an identity provider, for external login, registration or linking. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_start_identity_provider_intent_request: (required) + :type beta_user_service_start_identity_provider_intent_request: BetaUserServiceStartIdentityProviderIntentRequest + :param _request_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._start_identity_provider_intent_serialize( + beta_user_service_start_identity_provider_intent_request=beta_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': "BetaUserServiceStartIdentityProviderIntentResponse", + } + 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 start_identity_provider_intent_without_preload_content( + self, + beta_user_service_start_identity_provider_intent_request: BetaUserServiceStartIdentityProviderIntentRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """StartIdentityProviderIntent + + Start flow with an identity provider Start a flow with an identity provider, for external login, registration or linking. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_start_identity_provider_intent_request: (required) + :type beta_user_service_start_identity_provider_intent_request: BetaUserServiceStartIdentityProviderIntentRequest + :param _request_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._start_identity_provider_intent_serialize( + beta_user_service_start_identity_provider_intent_request=beta_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': "BetaUserServiceStartIdentityProviderIntentResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _start_identity_provider_intent_serialize( + self, + beta_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 beta_user_service_start_identity_provider_intent_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/StartIdentityProviderIntent', + 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 unlock_user( + self, + beta_user_service_unlock_user_request: BetaUserServiceUnlockUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceUnlockUserResponse: + """UnlockUser + + 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.). Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_unlock_user_request: (required) + :type beta_user_service_unlock_user_request: BetaUserServiceUnlockUserRequest + :param _request_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._unlock_user_serialize( + beta_user_service_unlock_user_request=beta_user_service_unlock_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceUnlockUserResponse", + } + 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 unlock_user_with_http_info( + self, + beta_user_service_unlock_user_request: BetaUserServiceUnlockUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceUnlockUserResponse]: + """UnlockUser + + 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.). Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_unlock_user_request: (required) + :type beta_user_service_unlock_user_request: BetaUserServiceUnlockUserRequest + :param _request_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._unlock_user_serialize( + beta_user_service_unlock_user_request=beta_user_service_unlock_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceUnlockUserResponse", + } + 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 unlock_user_without_preload_content( + self, + beta_user_service_unlock_user_request: BetaUserServiceUnlockUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """UnlockUser + + 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.). Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_unlock_user_request: (required) + :type beta_user_service_unlock_user_request: BetaUserServiceUnlockUserRequest + :param _request_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._unlock_user_serialize( + beta_user_service_unlock_user_request=beta_user_service_unlock_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceUnlockUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unlock_user_serialize( + self, + beta_user_service_unlock_user_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 beta_user_service_unlock_user_request is not None: + _body_params = beta_user_service_unlock_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='/zitadel.user.v2beta.UserService/UnlockUser', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_human_user( + self, + beta_user_service_update_human_user_request: BetaUserServiceUpdateHumanUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceUpdateHumanUserResponse: + """UpdateHumanUser + + Update User Update all information from a user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_update_human_user_request: (required) + :type beta_user_service_update_human_user_request: BetaUserServiceUpdateHumanUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_human_user_serialize( + beta_user_service_update_human_user_request=beta_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': "BetaUserServiceUpdateHumanUserResponse", + } + 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 update_human_user_with_http_info( + self, + beta_user_service_update_human_user_request: BetaUserServiceUpdateHumanUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceUpdateHumanUserResponse]: + """UpdateHumanUser + + Update User Update all information from a user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_update_human_user_request: (required) + :type beta_user_service_update_human_user_request: BetaUserServiceUpdateHumanUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_human_user_serialize( + beta_user_service_update_human_user_request=beta_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': "BetaUserServiceUpdateHumanUserResponse", + } + 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 update_human_user_without_preload_content( + self, + beta_user_service_update_human_user_request: BetaUserServiceUpdateHumanUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """UpdateHumanUser + + Update User Update all information from a user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_update_human_user_request: (required) + :type beta_user_service_update_human_user_request: BetaUserServiceUpdateHumanUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_human_user_serialize( + beta_user_service_update_human_user_request=beta_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': "BetaUserServiceUpdateHumanUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_human_user_serialize( + self, + beta_user_service_update_human_user_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 beta_user_service_update_human_user_request is not None: + _body_params = beta_user_service_update_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='/zitadel.user.v2beta.UserService/UpdateHumanUser', + 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 verify_email( + self, + beta_user_service_verify_email_request: BetaUserServiceVerifyEmailRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceVerifyEmailResponse: + """VerifyEmail + + Verify the email Verify the email with the generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_email_request: (required) + :type beta_user_service_verify_email_request: BetaUserServiceVerifyEmailRequest + :param _request_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._verify_email_serialize( + beta_user_service_verify_email_request=beta_user_service_verify_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyEmailResponse", + } + 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 verify_email_with_http_info( + self, + beta_user_service_verify_email_request: BetaUserServiceVerifyEmailRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceVerifyEmailResponse]: + """VerifyEmail + + Verify the email Verify the email with the generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_email_request: (required) + :type beta_user_service_verify_email_request: BetaUserServiceVerifyEmailRequest + :param _request_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._verify_email_serialize( + beta_user_service_verify_email_request=beta_user_service_verify_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyEmailResponse", + } + 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 verify_email_without_preload_content( + self, + beta_user_service_verify_email_request: BetaUserServiceVerifyEmailRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """VerifyEmail + + Verify the email Verify the email with the generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_email_request: (required) + :type beta_user_service_verify_email_request: BetaUserServiceVerifyEmailRequest + :param _request_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._verify_email_serialize( + beta_user_service_verify_email_request=beta_user_service_verify_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyEmailResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _verify_email_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_verify_email_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/VerifyEmail', + 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 verify_passkey_registration( + self, + beta_user_service_verify_passkey_registration_request: BetaUserServiceVerifyPasskeyRegistrationRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceVerifyPasskeyRegistrationResponse: + """VerifyPasskeyRegistration + + Verify a passkey for a user Verify the passkey registration with the public key credential. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_passkey_registration_request: (required) + :type beta_user_service_verify_passkey_registration_request: BetaUserServiceVerifyPasskeyRegistrationRequest + :param _request_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._verify_passkey_registration_serialize( + beta_user_service_verify_passkey_registration_request=beta_user_service_verify_passkey_registration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyPasskeyRegistrationResponse", + } + 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 verify_passkey_registration_with_http_info( + self, + beta_user_service_verify_passkey_registration_request: BetaUserServiceVerifyPasskeyRegistrationRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceVerifyPasskeyRegistrationResponse]: + """VerifyPasskeyRegistration + + Verify a passkey for a user Verify the passkey registration with the public key credential. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_passkey_registration_request: (required) + :type beta_user_service_verify_passkey_registration_request: BetaUserServiceVerifyPasskeyRegistrationRequest + :param _request_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._verify_passkey_registration_serialize( + beta_user_service_verify_passkey_registration_request=beta_user_service_verify_passkey_registration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyPasskeyRegistrationResponse", + } + 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 verify_passkey_registration_without_preload_content( + self, + beta_user_service_verify_passkey_registration_request: BetaUserServiceVerifyPasskeyRegistrationRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """VerifyPasskeyRegistration + + Verify a passkey for a user Verify the passkey registration with the public key credential. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_passkey_registration_request: (required) + :type beta_user_service_verify_passkey_registration_request: BetaUserServiceVerifyPasskeyRegistrationRequest + :param _request_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._verify_passkey_registration_serialize( + beta_user_service_verify_passkey_registration_request=beta_user_service_verify_passkey_registration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyPasskeyRegistrationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _verify_passkey_registration_serialize( + self, + beta_user_service_verify_passkey_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_verify_passkey_registration_request is not None: + _body_params = beta_user_service_verify_passkey_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='/zitadel.user.v2beta.UserService/VerifyPasskeyRegistration', + 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 verify_phone( + self, + beta_user_service_verify_phone_request: BetaUserServiceVerifyPhoneRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceVerifyPhoneResponse: + """VerifyPhone + + Verify the phone Verify the phone with the generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_phone_request: (required) + :type beta_user_service_verify_phone_request: BetaUserServiceVerifyPhoneRequest + :param _request_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._verify_phone_serialize( + beta_user_service_verify_phone_request=beta_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': "BetaUserServiceVerifyPhoneResponse", + } + 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 verify_phone_with_http_info( + self, + beta_user_service_verify_phone_request: BetaUserServiceVerifyPhoneRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceVerifyPhoneResponse]: + """VerifyPhone + + Verify the phone Verify the phone with the generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_phone_request: (required) + :type beta_user_service_verify_phone_request: BetaUserServiceVerifyPhoneRequest + :param _request_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._verify_phone_serialize( + beta_user_service_verify_phone_request=beta_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': "BetaUserServiceVerifyPhoneResponse", + } + 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 verify_phone_without_preload_content( + self, + beta_user_service_verify_phone_request: BetaUserServiceVerifyPhoneRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """VerifyPhone + + Verify the phone Verify the phone with the generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_phone_request: (required) + :type beta_user_service_verify_phone_request: BetaUserServiceVerifyPhoneRequest + :param _request_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._verify_phone_serialize( + beta_user_service_verify_phone_request=beta_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': "BetaUserServiceVerifyPhoneResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _verify_phone_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_verify_phone_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/VerifyPhone', + 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 verify_totp_registration( + self, + beta_user_service_verify_totp_registration_request: BetaUserServiceVerifyTOTPRegistrationRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceVerifyTOTPRegistrationResponse: + """VerifyTOTPRegistration + + Verify a TOTP generator for a user Verify the TOTP registration with a generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_totp_registration_request: (required) + :type beta_user_service_verify_totp_registration_request: BetaUserServiceVerifyTOTPRegistrationRequest + :param _request_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._verify_totp_registration_serialize( + beta_user_service_verify_totp_registration_request=beta_user_service_verify_totp_registration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyTOTPRegistrationResponse", + } + 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 verify_totp_registration_with_http_info( + self, + beta_user_service_verify_totp_registration_request: BetaUserServiceVerifyTOTPRegistrationRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceVerifyTOTPRegistrationResponse]: + """VerifyTOTPRegistration + + Verify a TOTP generator for a user Verify the TOTP registration with a generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_totp_registration_request: (required) + :type beta_user_service_verify_totp_registration_request: BetaUserServiceVerifyTOTPRegistrationRequest + :param _request_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._verify_totp_registration_serialize( + beta_user_service_verify_totp_registration_request=beta_user_service_verify_totp_registration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyTOTPRegistrationResponse", + } + 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 verify_totp_registration_without_preload_content( + self, + beta_user_service_verify_totp_registration_request: BetaUserServiceVerifyTOTPRegistrationRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """VerifyTOTPRegistration + + Verify a TOTP generator for a user Verify the TOTP registration with a generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_totp_registration_request: (required) + :type beta_user_service_verify_totp_registration_request: BetaUserServiceVerifyTOTPRegistrationRequest + :param _request_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._verify_totp_registration_serialize( + beta_user_service_verify_totp_registration_request=beta_user_service_verify_totp_registration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyTOTPRegistrationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _verify_totp_registration_serialize( + self, + beta_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_verify_totp_registration_request is not None: + _body_params = beta_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='/zitadel.user.v2beta.UserService/VerifyTOTPRegistration', + 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 verify_u2_f_registration( + self, + beta_user_service_verify_u2_f_registration_request: BetaUserServiceVerifyU2FRegistrationRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaUserServiceVerifyU2FRegistrationResponse: + """VerifyU2FRegistration + + Verify a u2f token for a user Verify the u2f token registration with the public key credential. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_u2_f_registration_request: (required) + :type beta_user_service_verify_u2_f_registration_request: BetaUserServiceVerifyU2FRegistrationRequest + :param _request_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._verify_u2_f_registration_serialize( + beta_user_service_verify_u2_f_registration_request=beta_user_service_verify_u2_f_registration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyU2FRegistrationResponse", + } + 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 verify_u2_f_registration_with_http_info( + self, + beta_user_service_verify_u2_f_registration_request: BetaUserServiceVerifyU2FRegistrationRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaUserServiceVerifyU2FRegistrationResponse]: + """VerifyU2FRegistration + + Verify a u2f token for a user Verify the u2f token registration with the public key credential. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_u2_f_registration_request: (required) + :type beta_user_service_verify_u2_f_registration_request: BetaUserServiceVerifyU2FRegistrationRequest + :param _request_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._verify_u2_f_registration_serialize( + beta_user_service_verify_u2_f_registration_request=beta_user_service_verify_u2_f_registration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyU2FRegistrationResponse", + } + 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 verify_u2_f_registration_without_preload_content( + self, + beta_user_service_verify_u2_f_registration_request: BetaUserServiceVerifyU2FRegistrationRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """VerifyU2FRegistration + + Verify a u2f token for a user Verify the u2f token registration with the public key credential. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_u2_f_registration_request: (required) + :type beta_user_service_verify_u2_f_registration_request: BetaUserServiceVerifyU2FRegistrationRequest + :param _request_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._verify_u2_f_registration_serialize( + beta_user_service_verify_u2_f_registration_request=beta_user_service_verify_u2_f_registration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyU2FRegistrationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _verify_u2_f_registration_serialize( + self, + beta_user_service_verify_u2_f_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_verify_u2_f_registration_request is not None: + _body_params = beta_user_service_verify_u2_f_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='/zitadel.user.v2beta.UserService/VerifyU2FRegistration', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/web_key_service_api.py b/zitadel_client/api/beta_web_key_service_api.py similarity index 60% rename from zitadel_client/api/web_key_service_api.py rename to zitadel_client/api/beta_web_key_service_api.py index bf3b1c15..ee1e2a3e 100644 --- a/zitadel_client/api/web_key_service_api.py +++ b/zitadel_client/api/beta_web_key_service_api.py @@ -16,19 +16,22 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr -from zitadel_client.models.web_key_service_beta_activate_web_key_response import WebKeyServiceBetaActivateWebKeyResponse -from zitadel_client.models.web_key_service_beta_create_web_key_response import WebKeyServiceBetaCreateWebKeyResponse -from zitadel_client.models.web_key_service_beta_delete_web_key_response import WebKeyServiceBetaDeleteWebKeyResponse -from zitadel_client.models.web_key_service_beta_list_web_keys_response import WebKeyServiceBetaListWebKeysResponse -from zitadel_client.models.web_key_service_create_web_key_request import WebKeyServiceCreateWebKeyRequest +from typing import Any, Dict +from zitadel_client.models.beta_web_key_service_activate_web_key_request import BetaWebKeyServiceActivateWebKeyRequest +from zitadel_client.models.beta_web_key_service_activate_web_key_response import BetaWebKeyServiceActivateWebKeyResponse +from zitadel_client.models.beta_web_key_service_create_web_key_request import BetaWebKeyServiceCreateWebKeyRequest +from zitadel_client.models.beta_web_key_service_create_web_key_response import BetaWebKeyServiceCreateWebKeyResponse +from zitadel_client.models.beta_web_key_service_delete_web_key_request import BetaWebKeyServiceDeleteWebKeyRequest +from zitadel_client.models.beta_web_key_service_delete_web_key_response import BetaWebKeyServiceDeleteWebKeyResponse +from zitadel_client.models.beta_web_key_service_list_web_keys_response import BetaWebKeyServiceListWebKeysResponse +from zitadel_client.models.no_op200_response3 import NoOp200Response3 from zitadel_client.api_client import ApiClient, RequestSerialized from zitadel_client.api_response import ApiResponse from zitadel_client.rest import RESTResponseType -class WebKeyServiceApi: +class BetaWebKeyServiceApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -42,9 +45,9 @@ def __init__(self, api_client=None) -> None: @validate_call - def web_key_service_activate_web_key( + def activate_web_key( self, - id: StrictStr, + beta_web_key_service_activate_web_key_request: BetaWebKeyServiceActivateWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -57,13 +60,13 @@ def web_key_service_activate_web_key( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> WebKeyServiceBetaActivateWebKeyResponse: - """Activate Web Key + ) -> BetaWebKeyServiceActivateWebKeyResponse: + """ActivateWebKey - 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` + 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 beta_web_key_service_activate_web_key_request: (required) + :type beta_web_key_service_activate_web_key_request: BetaWebKeyServiceActivateWebKeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -86,8 +89,8 @@ def web_key_service_activate_web_key( :return: Returns the result object. """ # noqa: E501 - _param = self._web_key_service_activate_web_key_serialize( - id=id, + _param = self._activate_web_key_serialize( + beta_web_key_service_activate_web_key_request=beta_web_key_service_activate_web_key_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -95,10 +98,7 @@ def web_key_service_activate_web_key( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaActivateWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "object", + '200': "BetaWebKeyServiceActivateWebKeyResponse", } response_data = self.api_client.call_api( *_param, @@ -112,9 +112,9 @@ def web_key_service_activate_web_key( @validate_call - def web_key_service_activate_web_key_with_http_info( + def activate_web_key_with_http_info( self, - id: StrictStr, + beta_web_key_service_activate_web_key_request: BetaWebKeyServiceActivateWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -127,13 +127,13 @@ def web_key_service_activate_web_key_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[WebKeyServiceBetaActivateWebKeyResponse]: - """Activate Web Key + ) -> ApiResponse[BetaWebKeyServiceActivateWebKeyResponse]: + """ActivateWebKey - 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` + 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 beta_web_key_service_activate_web_key_request: (required) + :type beta_web_key_service_activate_web_key_request: BetaWebKeyServiceActivateWebKeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -156,8 +156,8 @@ def web_key_service_activate_web_key_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._web_key_service_activate_web_key_serialize( - id=id, + _param = self._activate_web_key_serialize( + beta_web_key_service_activate_web_key_request=beta_web_key_service_activate_web_key_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -165,10 +165,7 @@ def web_key_service_activate_web_key_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaActivateWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "object", + '200': "BetaWebKeyServiceActivateWebKeyResponse", } response_data = self.api_client.call_api( *_param, @@ -182,9 +179,9 @@ def web_key_service_activate_web_key_with_http_info( @validate_call - def web_key_service_activate_web_key_without_preload_content( + def activate_web_key_without_preload_content( self, - id: StrictStr, + beta_web_key_service_activate_web_key_request: BetaWebKeyServiceActivateWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -198,12 +195,12 @@ def web_key_service_activate_web_key_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Activate Web Key + """ActivateWebKey - 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` + 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 beta_web_key_service_activate_web_key_request: (required) + :type beta_web_key_service_activate_web_key_request: BetaWebKeyServiceActivateWebKeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -226,8 +223,8 @@ def web_key_service_activate_web_key_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._web_key_service_activate_web_key_serialize( - id=id, + _param = self._activate_web_key_serialize( + beta_web_key_service_activate_web_key_request=beta_web_key_service_activate_web_key_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -235,10 +232,7 @@ def web_key_service_activate_web_key_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaActivateWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "object", + '200': "BetaWebKeyServiceActivateWebKeyResponse", } response_data = self.api_client.call_api( *_param, @@ -247,9 +241,9 @@ def web_key_service_activate_web_key_without_preload_content( return response_data.response - def _web_key_service_activate_web_key_serialize( + def _activate_web_key_serialize( self, - id, + beta_web_key_service_activate_web_key_request, _request_auth, _content_type, _headers, @@ -271,12 +265,12 @@ def _web_key_service_activate_web_key_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 beta_web_key_service_activate_web_key_request is not None: + _body_params = beta_web_key_service_activate_web_key_request # set the HTTP header `Accept` @@ -287,6 +281,19 @@ def _web_key_service_activate_web_key_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] = [ @@ -295,7 +302,7 @@ def _web_key_service_activate_web_key_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2beta/web_keys/{id}/activate', + resource_path='/zitadel.webkey.v2beta.WebKeyService/ActivateWebKey', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -312,9 +319,9 @@ def _web_key_service_activate_web_key_serialize( @validate_call - def web_key_service_create_web_key( + def create_web_key( self, - web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest, + beta_web_key_service_create_web_key_request: BetaWebKeyServiceCreateWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -327,13 +334,13 @@ def web_key_service_create_web_key( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> WebKeyServiceBetaCreateWebKeyResponse: - """Create Web Key + ) -> BetaWebKeyServiceCreateWebKeyResponse: + """CreateWebKey - 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` + 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 beta_web_key_service_create_web_key_request: (required) + :type beta_web_key_service_create_web_key_request: BetaWebKeyServiceCreateWebKeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -356,8 +363,8 @@ def web_key_service_create_web_key( :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, + _param = self._create_web_key_serialize( + beta_web_key_service_create_web_key_request=beta_web_key_service_create_web_key_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -365,10 +372,7 @@ def web_key_service_create_web_key( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaCreateWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", + '200': "BetaWebKeyServiceCreateWebKeyResponse", } response_data = self.api_client.call_api( *_param, @@ -382,9 +386,9 @@ def web_key_service_create_web_key( @validate_call - def web_key_service_create_web_key_with_http_info( + def create_web_key_with_http_info( self, - web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest, + beta_web_key_service_create_web_key_request: BetaWebKeyServiceCreateWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -397,13 +401,13 @@ def web_key_service_create_web_key_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[WebKeyServiceBetaCreateWebKeyResponse]: - """Create Web Key + ) -> ApiResponse[BetaWebKeyServiceCreateWebKeyResponse]: + """CreateWebKey - 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` + 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 beta_web_key_service_create_web_key_request: (required) + :type beta_web_key_service_create_web_key_request: BetaWebKeyServiceCreateWebKeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -426,8 +430,8 @@ def web_key_service_create_web_key_with_http_info( :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, + _param = self._create_web_key_serialize( + beta_web_key_service_create_web_key_request=beta_web_key_service_create_web_key_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -435,10 +439,7 @@ def web_key_service_create_web_key_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaCreateWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", + '200': "BetaWebKeyServiceCreateWebKeyResponse", } response_data = self.api_client.call_api( *_param, @@ -452,9 +453,9 @@ def web_key_service_create_web_key_with_http_info( @validate_call - def web_key_service_create_web_key_without_preload_content( + def create_web_key_without_preload_content( self, - web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest, + beta_web_key_service_create_web_key_request: BetaWebKeyServiceCreateWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -468,12 +469,12 @@ def web_key_service_create_web_key_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Web Key + """CreateWebKey - 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` + 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 beta_web_key_service_create_web_key_request: (required) + :type beta_web_key_service_create_web_key_request: BetaWebKeyServiceCreateWebKeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -496,8 +497,8 @@ def web_key_service_create_web_key_without_preload_content( :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, + _param = self._create_web_key_serialize( + beta_web_key_service_create_web_key_request=beta_web_key_service_create_web_key_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -505,10 +506,7 @@ def web_key_service_create_web_key_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaCreateWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", + '200': "BetaWebKeyServiceCreateWebKeyResponse", } response_data = self.api_client.call_api( *_param, @@ -517,9 +515,9 @@ def web_key_service_create_web_key_without_preload_content( return response_data.response - def _web_key_service_create_web_key_serialize( + def _create_web_key_serialize( self, - web_key_service_create_web_key_request, + beta_web_key_service_create_web_key_request, _request_auth, _content_type, _headers, @@ -545,8 +543,8 @@ def _web_key_service_create_web_key_serialize( # process the header parameters # process the form parameters # process the body parameter - if web_key_service_create_web_key_request is not None: - _body_params = web_key_service_create_web_key_request + if beta_web_key_service_create_web_key_request is not None: + _body_params = beta_web_key_service_create_web_key_request # set the HTTP header `Accept` @@ -578,7 +576,7 @@ def _web_key_service_create_web_key_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2beta/web_keys', + resource_path='/zitadel.webkey.v2beta.WebKeyService/CreateWebKey', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -595,9 +593,9 @@ def _web_key_service_create_web_key_serialize( @validate_call - def web_key_service_delete_web_key( + def delete_web_key( self, - id: StrictStr, + beta_web_key_service_delete_web_key_request: BetaWebKeyServiceDeleteWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -610,13 +608,13 @@ def web_key_service_delete_web_key( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> WebKeyServiceBetaDeleteWebKeyResponse: - """Delete Web Key + ) -> BetaWebKeyServiceDeleteWebKeyResponse: + """DeleteWebKey - 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` + 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 beta_web_key_service_delete_web_key_request: (required) + :type beta_web_key_service_delete_web_key_request: BetaWebKeyServiceDeleteWebKeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -639,8 +637,8 @@ def web_key_service_delete_web_key( :return: Returns the result object. """ # noqa: E501 - _param = self._web_key_service_delete_web_key_serialize( - id=id, + _param = self._delete_web_key_serialize( + beta_web_key_service_delete_web_key_request=beta_web_key_service_delete_web_key_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -648,10 +646,7 @@ def web_key_service_delete_web_key( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaDeleteWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", + '200': "BetaWebKeyServiceDeleteWebKeyResponse", } response_data = self.api_client.call_api( *_param, @@ -665,9 +660,9 @@ def web_key_service_delete_web_key( @validate_call - def web_key_service_delete_web_key_with_http_info( + def delete_web_key_with_http_info( self, - id: StrictStr, + beta_web_key_service_delete_web_key_request: BetaWebKeyServiceDeleteWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -680,13 +675,13 @@ def web_key_service_delete_web_key_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[WebKeyServiceBetaDeleteWebKeyResponse]: - """Delete Web Key + ) -> ApiResponse[BetaWebKeyServiceDeleteWebKeyResponse]: + """DeleteWebKey - 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` + 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 beta_web_key_service_delete_web_key_request: (required) + :type beta_web_key_service_delete_web_key_request: BetaWebKeyServiceDeleteWebKeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -709,8 +704,8 @@ def web_key_service_delete_web_key_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._web_key_service_delete_web_key_serialize( - id=id, + _param = self._delete_web_key_serialize( + beta_web_key_service_delete_web_key_request=beta_web_key_service_delete_web_key_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -718,10 +713,7 @@ def web_key_service_delete_web_key_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaDeleteWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", + '200': "BetaWebKeyServiceDeleteWebKeyResponse", } response_data = self.api_client.call_api( *_param, @@ -735,9 +727,9 @@ def web_key_service_delete_web_key_with_http_info( @validate_call - def web_key_service_delete_web_key_without_preload_content( + def delete_web_key_without_preload_content( self, - id: StrictStr, + beta_web_key_service_delete_web_key_request: BetaWebKeyServiceDeleteWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -751,12 +743,12 @@ def web_key_service_delete_web_key_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Web Key + """DeleteWebKey - 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` + 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 beta_web_key_service_delete_web_key_request: (required) + :type beta_web_key_service_delete_web_key_request: BetaWebKeyServiceDeleteWebKeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -779,8 +771,8 @@ def web_key_service_delete_web_key_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._web_key_service_delete_web_key_serialize( - id=id, + _param = self._delete_web_key_serialize( + beta_web_key_service_delete_web_key_request=beta_web_key_service_delete_web_key_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -788,10 +780,7 @@ def web_key_service_delete_web_key_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaDeleteWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", + '200': "BetaWebKeyServiceDeleteWebKeyResponse", } response_data = self.api_client.call_api( *_param, @@ -800,9 +789,9 @@ def web_key_service_delete_web_key_without_preload_content( return response_data.response - def _web_key_service_delete_web_key_serialize( + def _delete_web_key_serialize( self, - id, + beta_web_key_service_delete_web_key_request, _request_auth, _content_type, _headers, @@ -824,12 +813,12 @@ def _web_key_service_delete_web_key_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 beta_web_key_service_delete_web_key_request is not None: + _body_params = beta_web_key_service_delete_web_key_request # set the HTTP header `Accept` @@ -840,6 +829,19 @@ def _web_key_service_delete_web_key_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] = [ @@ -847,8 +849,282 @@ def _web_key_service_delete_web_key_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2beta/web_keys/{id}', + method='POST', + resource_path='/zitadel.webkey.v2beta.WebKeyService/DeleteWebKey', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_web_keys( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BetaWebKeyServiceListWebKeysResponse: + """ListWebKeys + + List Web Keys List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_web_keys_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaWebKeyServiceListWebKeysResponse", + } + 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 list_web_keys_with_http_info( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[BetaWebKeyServiceListWebKeysResponse]: + """ListWebKeys + + List Web Keys List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_web_keys_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaWebKeyServiceListWebKeysResponse", + } + 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 list_web_keys_without_preload_content( + self, + body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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: + """ListWebKeys + + List Web Keys List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_web_keys_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaWebKeyServiceListWebKeysResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_web_keys_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.webkey.v2beta.WebKeyService/ListWebKeys', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -865,7 +1141,7 @@ def _web_key_service_delete_web_key_serialize( @validate_call - def web_key_service_list_web_keys( + def no_op( self, _request_timeout: Union[ None, @@ -879,10 +1155,9 @@ def web_key_service_list_web_keys( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> WebKeyServiceBetaListWebKeysResponse: - """List Web Keys + ) -> NoOp200Response3: + """Dummy endpoint to retain union-member schemas - 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 @@ -906,7 +1181,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._no_op_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -914,10 +1189,7 @@ def web_key_service_list_web_keys( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaListWebKeysResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", + '200': "NoOp200Response3", } response_data = self.api_client.call_api( *_param, @@ -931,7 +1203,7 @@ def web_key_service_list_web_keys( @validate_call - def web_key_service_list_web_keys_with_http_info( + def no_op_with_http_info( self, _request_timeout: Union[ None, @@ -945,10 +1217,9 @@ def web_key_service_list_web_keys_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[WebKeyServiceBetaListWebKeysResponse]: - """List Web Keys + ) -> ApiResponse[NoOp200Response3]: + """Dummy endpoint to retain union-member schemas - 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 @@ -972,7 +1243,7 @@ def web_key_service_list_web_keys_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._web_key_service_list_web_keys_serialize( + _param = self._no_op_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -980,10 +1251,7 @@ def web_key_service_list_web_keys_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaListWebKeysResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", + '200': "NoOp200Response3", } response_data = self.api_client.call_api( *_param, @@ -997,7 +1265,7 @@ def web_key_service_list_web_keys_with_http_info( @validate_call - def web_key_service_list_web_keys_without_preload_content( + def no_op_without_preload_content( self, _request_timeout: Union[ None, @@ -1012,9 +1280,8 @@ def web_key_service_list_web_keys_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Web Keys + """Dummy endpoint to retain union-member schemas - 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 @@ -1038,7 +1305,7 @@ def web_key_service_list_web_keys_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._web_key_service_list_web_keys_serialize( + _param = self._no_op_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1046,10 +1313,7 @@ def web_key_service_list_web_keys_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaListWebKeysResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", + '200': "NoOp200Response3", } response_data = self.api_client.call_api( *_param, @@ -1058,7 +1322,7 @@ def web_key_service_list_web_keys_without_preload_content( return response_data.response - def _web_key_service_list_web_keys_serialize( + def _no_op_serialize( self, _request_auth, _content_type, @@ -1103,7 +1367,7 @@ def _web_key_service_list_web_keys_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2beta/web_keys', + resource_path='/5b6ad408', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/feature_service_api.py b/zitadel_client/api/feature_service_api.py index 9d60962b..5f1c4c88 100644 --- a/zitadel_client/api/feature_service_api.py +++ b/zitadel_client/api/feature_service_api.py @@ -16,22 +16,27 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr -from typing import Optional -from typing_extensions import Annotated +from typing import Any, Dict +from zitadel_client.models.feature_service_get_instance_features_request import FeatureServiceGetInstanceFeaturesRequest from zitadel_client.models.feature_service_get_instance_features_response import FeatureServiceGetInstanceFeaturesResponse +from zitadel_client.models.feature_service_get_organization_features_request import FeatureServiceGetOrganizationFeaturesRequest from zitadel_client.models.feature_service_get_organization_features_response import FeatureServiceGetOrganizationFeaturesResponse from zitadel_client.models.feature_service_get_system_features_response import FeatureServiceGetSystemFeaturesResponse +from zitadel_client.models.feature_service_get_user_features_request import FeatureServiceGetUserFeaturesRequest from zitadel_client.models.feature_service_get_user_features_response import FeatureServiceGetUserFeaturesResponse from zitadel_client.models.feature_service_reset_instance_features_response import FeatureServiceResetInstanceFeaturesResponse +from zitadel_client.models.feature_service_reset_organization_features_request import FeatureServiceResetOrganizationFeaturesRequest from zitadel_client.models.feature_service_reset_organization_features_response import FeatureServiceResetOrganizationFeaturesResponse from zitadel_client.models.feature_service_reset_system_features_response import FeatureServiceResetSystemFeaturesResponse +from zitadel_client.models.feature_service_reset_user_features_request import FeatureServiceResetUserFeaturesRequest from zitadel_client.models.feature_service_reset_user_features_response import FeatureServiceResetUserFeaturesResponse from zitadel_client.models.feature_service_set_instance_features_request import FeatureServiceSetInstanceFeaturesRequest from zitadel_client.models.feature_service_set_instance_features_response import FeatureServiceSetInstanceFeaturesResponse +from zitadel_client.models.feature_service_set_organization_features_request import FeatureServiceSetOrganizationFeaturesRequest from zitadel_client.models.feature_service_set_organization_features_response import FeatureServiceSetOrganizationFeaturesResponse from zitadel_client.models.feature_service_set_system_features_request import FeatureServiceSetSystemFeaturesRequest from zitadel_client.models.feature_service_set_system_features_response import FeatureServiceSetSystemFeaturesResponse +from zitadel_client.models.feature_service_set_user_feature_request import FeatureServiceSetUserFeatureRequest from zitadel_client.models.feature_service_set_user_features_response import FeatureServiceSetUserFeaturesResponse from zitadel_client.api_client import ApiClient, RequestSerialized @@ -53,9 +58,9 @@ def __init__(self, api_client=None) -> None: @validate_call - def feature_service_get_instance_features( + def get_instance_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, + feature_service_get_instance_features_request: FeatureServiceGetInstanceFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -69,12 +74,12 @@ def feature_service_get_instance_features( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceGetInstanceFeaturesResponse: - """Get Instance Features + """GetInstanceFeatures - Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - none + Get Instance Features Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - 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 feature_service_get_instance_features_request: (required) + :type feature_service_get_instance_features_request: FeatureServiceGetInstanceFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -97,8 +102,8 @@ def feature_service_get_instance_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_get_instance_features_serialize( - inheritance=inheritance, + _param = self._get_instance_features_serialize( + feature_service_get_instance_features_request=feature_service_get_instance_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -107,8 +112,6 @@ def feature_service_get_instance_features( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -122,9 +125,9 @@ def feature_service_get_instance_features( @validate_call - def feature_service_get_instance_features_with_http_info( + def get_instance_features_with_http_info( 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, + feature_service_get_instance_features_request: FeatureServiceGetInstanceFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -138,12 +141,12 @@ def feature_service_get_instance_features_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[FeatureServiceGetInstanceFeaturesResponse]: - """Get Instance Features + """GetInstanceFeatures - Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - none + Get Instance Features Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - 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 feature_service_get_instance_features_request: (required) + :type feature_service_get_instance_features_request: FeatureServiceGetInstanceFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -166,8 +169,8 @@ def feature_service_get_instance_features_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_get_instance_features_serialize( - inheritance=inheritance, + _param = self._get_instance_features_serialize( + feature_service_get_instance_features_request=feature_service_get_instance_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -176,8 +179,6 @@ def feature_service_get_instance_features_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -191,9 +192,9 @@ def feature_service_get_instance_features_with_http_info( @validate_call - def feature_service_get_instance_features_without_preload_content( + def get_instance_features_without_preload_content( 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, + feature_service_get_instance_features_request: FeatureServiceGetInstanceFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -207,12 +208,12 @@ def feature_service_get_instance_features_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Instance Features + """GetInstanceFeatures - Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - none + Get Instance Features Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - 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 feature_service_get_instance_features_request: (required) + :type feature_service_get_instance_features_request: FeatureServiceGetInstanceFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -235,8 +236,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( - inheritance=inheritance, + _param = self._get_instance_features_serialize( + feature_service_get_instance_features_request=feature_service_get_instance_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -245,8 +246,6 @@ def feature_service_get_instance_features_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -255,9 +254,9 @@ def feature_service_get_instance_features_without_preload_content( return response_data.response - def _feature_service_get_instance_features_serialize( + def _get_instance_features_serialize( self, - inheritance, + feature_service_get_instance_features_request, _request_auth, _content_type, _headers, @@ -280,13 +279,11 @@ def _feature_service_get_instance_features_serialize( # 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 + if feature_service_get_instance_features_request is not None: + _body_params = feature_service_get_instance_features_request # set the HTTP header `Accept` @@ -297,6 +294,19 @@ def _feature_service_get_instance_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] = [ @@ -304,8 +314,8 @@ def _feature_service_get_instance_features_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/features/instance', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/GetInstanceFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -322,10 +332,9 @@ def _feature_service_get_instance_features_serialize( @validate_call - def feature_service_get_organization_features( + def get_organization_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, + feature_service_get_organization_features_request: FeatureServiceGetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -339,14 +348,12 @@ def feature_service_get_organization_features( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceGetOrganizationFeaturesResponse: - """Get Organization Features + """GetOrganizationFeatures - 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 + 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 feature_service_get_organization_features_request: (required) + :type feature_service_get_organization_features_request: FeatureServiceGetOrganizationFeaturesRequest :param _request_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 +376,8 @@ 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._get_organization_features_serialize( + feature_service_get_organization_features_request=feature_service_get_organization_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -380,8 +386,6 @@ def feature_service_get_organization_features( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -395,10 +399,9 @@ def feature_service_get_organization_features( @validate_call - def feature_service_get_organization_features_with_http_info( + def get_organization_features_with_http_info( 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, + feature_service_get_organization_features_request: FeatureServiceGetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -412,14 +415,12 @@ def feature_service_get_organization_features_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[FeatureServiceGetOrganizationFeaturesResponse]: - """Get Organization Features + """GetOrganizationFeatures - 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 + 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 feature_service_get_organization_features_request: (required) + :type feature_service_get_organization_features_request: FeatureServiceGetOrganizationFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -442,9 +443,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, - inheritance=inheritance, + _param = self._get_organization_features_serialize( + feature_service_get_organization_features_request=feature_service_get_organization_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -453,8 +453,6 @@ def feature_service_get_organization_features_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -468,10 +466,9 @@ def feature_service_get_organization_features_with_http_info( @validate_call - def feature_service_get_organization_features_without_preload_content( + def get_organization_features_without_preload_content( 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, + feature_service_get_organization_features_request: FeatureServiceGetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -485,14 +482,12 @@ def feature_service_get_organization_features_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Organization Features + """GetOrganizationFeatures - 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 + 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 feature_service_get_organization_features_request: (required) + :type feature_service_get_organization_features_request: FeatureServiceGetOrganizationFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -515,9 +510,8 @@ def feature_service_get_organization_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_get_organization_features_serialize( - organization_id=organization_id, - inheritance=inheritance, + _param = self._get_organization_features_serialize( + feature_service_get_organization_features_request=feature_service_get_organization_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -526,8 +520,6 @@ def feature_service_get_organization_features_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -536,10 +528,9 @@ def feature_service_get_organization_features_without_preload_content( return response_data.response - def _feature_service_get_organization_features_serialize( + def _get_organization_features_serialize( self, - organization_id, - inheritance, + feature_service_get_organization_features_request, _request_auth, _content_type, _headers, @@ -561,16 +552,12 @@ 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 # 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 + if feature_service_get_organization_features_request is not None: + _body_params = feature_service_get_organization_features_request # set the HTTP header `Accept` @@ -581,6 +568,19 @@ def _feature_service_get_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] = [ @@ -588,8 +588,8 @@ def _feature_service_get_organization_features_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/features/organization/{organizationId}', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/GetOrganizationFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -606,8 +606,9 @@ def _feature_service_get_organization_features_serialize( @validate_call - def feature_service_get_system_features( + def get_system_features( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -621,10 +622,12 @@ def feature_service_get_system_features( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceGetSystemFeaturesResponse: - """Get System Features + """GetSystemFeatures - Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none + Get System Features Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -647,7 +650,8 @@ def feature_service_get_system_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_get_system_features_serialize( + _param = self._get_system_features_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -656,8 +660,6 @@ def feature_service_get_system_features( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -671,8 +673,9 @@ def feature_service_get_system_features( @validate_call - def feature_service_get_system_features_with_http_info( + def get_system_features_with_http_info( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -686,10 +689,12 @@ def feature_service_get_system_features_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[FeatureServiceGetSystemFeaturesResponse]: - """Get System Features + """GetSystemFeatures - Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none + Get System Features Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -712,7 +717,8 @@ def feature_service_get_system_features_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_get_system_features_serialize( + _param = self._get_system_features_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -721,8 +727,6 @@ def feature_service_get_system_features_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -736,8 +740,9 @@ def feature_service_get_system_features_with_http_info( @validate_call - def feature_service_get_system_features_without_preload_content( + def get_system_features_without_preload_content( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -751,10 +756,12 @@ def feature_service_get_system_features_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get System Features + """GetSystemFeatures - Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none + Get System Features Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -777,7 +784,8 @@ def feature_service_get_system_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_get_system_features_serialize( + _param = self._get_system_features_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -786,8 +794,6 @@ def feature_service_get_system_features_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -796,8 +802,9 @@ def feature_service_get_system_features_without_preload_content( return response_data.response - def _feature_service_get_system_features_serialize( + def _get_system_features_serialize( self, + body, _request_auth, _content_type, _headers, @@ -823,6 +830,8 @@ def _feature_service_get_system_features_serialize( # process the header parameters # process the form parameters # process the body parameter + if body is not None: + _body_params = body # set the HTTP header `Accept` @@ -833,6 +842,19 @@ def _feature_service_get_system_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] = [ @@ -840,8 +862,8 @@ def _feature_service_get_system_features_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/features/system', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/GetSystemFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -858,10 +880,9 @@ def _feature_service_get_system_features_serialize( @validate_call - def feature_service_get_user_features( + def 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, + feature_service_get_user_features_request: FeatureServiceGetUserFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -875,14 +896,12 @@ def feature_service_get_user_features( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceGetUserFeaturesResponse: - """Get User Features + """GetUserFeatures - 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 + 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 feature_service_get_user_features_request: (required) + :type feature_service_get_user_features_request: FeatureServiceGetUserFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -905,9 +924,8 @@ def feature_service_get_user_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_get_user_features_serialize( - user_id=user_id, - inheritance=inheritance, + _param = self._get_user_features_serialize( + feature_service_get_user_features_request=feature_service_get_user_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -916,8 +934,6 @@ def feature_service_get_user_features( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -931,10 +947,9 @@ def feature_service_get_user_features( @validate_call - def feature_service_get_user_features_with_http_info( + def 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, + feature_service_get_user_features_request: FeatureServiceGetUserFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -948,14 +963,12 @@ def feature_service_get_user_features_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[FeatureServiceGetUserFeaturesResponse]: - """Get User Features + """GetUserFeatures - 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 + 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 feature_service_get_user_features_request: (required) + :type feature_service_get_user_features_request: FeatureServiceGetUserFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -978,9 +991,8 @@ def feature_service_get_user_features_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_get_user_features_serialize( - user_id=user_id, - inheritance=inheritance, + _param = self._get_user_features_serialize( + feature_service_get_user_features_request=feature_service_get_user_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -989,8 +1001,6 @@ def feature_service_get_user_features_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1004,10 +1014,9 @@ def feature_service_get_user_features_with_http_info( @validate_call - def feature_service_get_user_features_without_preload_content( + def 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, + feature_service_get_user_features_request: FeatureServiceGetUserFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1021,14 +1030,12 @@ def feature_service_get_user_features_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get User Features + """GetUserFeatures - 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 + 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 feature_service_get_user_features_request: (required) + :type feature_service_get_user_features_request: FeatureServiceGetUserFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1051,9 +1058,8 @@ def feature_service_get_user_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_get_user_features_serialize( - user_id=user_id, - inheritance=inheritance, + _param = self._get_user_features_serialize( + feature_service_get_user_features_request=feature_service_get_user_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1062,8 +1068,6 @@ def feature_service_get_user_features_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1072,10 +1076,9 @@ def feature_service_get_user_features_without_preload_content( return response_data.response - def _feature_service_get_user_features_serialize( + def _get_user_features_serialize( self, - user_id, - inheritance, + feature_service_get_user_features_request, _request_auth, _content_type, _headers, @@ -1097,16 +1100,12 @@ def _feature_service_get_user_features_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 - if inheritance is not None: - - _query_params.append(('inheritance', inheritance)) - # process the header parameters # process the form parameters # process the body parameter + if feature_service_get_user_features_request is not None: + _body_params = feature_service_get_user_features_request # set the HTTP header `Accept` @@ -1117,6 +1116,19 @@ def _feature_service_get_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] = [ @@ -1124,8 +1136,8 @@ def _feature_service_get_user_features_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/features/user/{userId}', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/GetUserFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1142,8 +1154,9 @@ def _feature_service_get_user_features_serialize( @validate_call - def feature_service_reset_instance_features( + def reset_instance_features( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1157,10 +1170,12 @@ def feature_service_reset_instance_features( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceResetInstanceFeaturesResponse: - """Reset Instance Features + """ResetInstanceFeatures - Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete + Reset Instance Features Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1183,7 +1198,8 @@ def feature_service_reset_instance_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_reset_instance_features_serialize( + _param = self._reset_instance_features_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1192,8 +1208,6 @@ def feature_service_reset_instance_features( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1207,8 +1221,9 @@ def feature_service_reset_instance_features( @validate_call - def feature_service_reset_instance_features_with_http_info( + def reset_instance_features_with_http_info( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1222,10 +1237,12 @@ def feature_service_reset_instance_features_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[FeatureServiceResetInstanceFeaturesResponse]: - """Reset Instance Features + """ResetInstanceFeatures - Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete + Reset Instance Features Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1248,7 +1265,8 @@ def feature_service_reset_instance_features_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_reset_instance_features_serialize( + _param = self._reset_instance_features_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1257,8 +1275,6 @@ def feature_service_reset_instance_features_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1272,8 +1288,9 @@ def feature_service_reset_instance_features_with_http_info( @validate_call - def feature_service_reset_instance_features_without_preload_content( + def reset_instance_features_without_preload_content( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1287,10 +1304,12 @@ def feature_service_reset_instance_features_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Reset Instance Features + """ResetInstanceFeatures - Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete + Reset Instance Features Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1313,7 +1332,8 @@ def feature_service_reset_instance_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_reset_instance_features_serialize( + _param = self._reset_instance_features_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1322,8 +1342,6 @@ def feature_service_reset_instance_features_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1332,8 +1350,9 @@ def feature_service_reset_instance_features_without_preload_content( return response_data.response - def _feature_service_reset_instance_features_serialize( + def _reset_instance_features_serialize( self, + body, _request_auth, _content_type, _headers, @@ -1359,6 +1378,8 @@ def _feature_service_reset_instance_features_serialize( # process the header parameters # process the form parameters # process the body parameter + if body is not None: + _body_params = body # set the HTTP header `Accept` @@ -1369,6 +1390,19 @@ def _feature_service_reset_instance_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] = [ @@ -1376,8 +1410,8 @@ def _feature_service_reset_instance_features_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/features/instance', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/ResetInstanceFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1394,9 +1428,9 @@ def _feature_service_reset_instance_features_serialize( @validate_call - def feature_service_reset_organization_features( + def reset_organization_features( self, - organization_id: StrictStr, + feature_service_reset_organization_features_request: FeatureServiceResetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1410,12 +1444,12 @@ def feature_service_reset_organization_features( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceResetOrganizationFeaturesResponse: - """Reset Organization Features + """ResetOrganizationFeatures - Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete + 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 feature_service_reset_organization_features_request: (required) + :type feature_service_reset_organization_features_request: FeatureServiceResetOrganizationFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1438,8 +1472,8 @@ def feature_service_reset_organization_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_reset_organization_features_serialize( - organization_id=organization_id, + _param = self._reset_organization_features_serialize( + feature_service_reset_organization_features_request=feature_service_reset_organization_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1448,8 +1482,6 @@ def feature_service_reset_organization_features( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1463,9 +1495,9 @@ def feature_service_reset_organization_features( @validate_call - def feature_service_reset_organization_features_with_http_info( + def reset_organization_features_with_http_info( self, - organization_id: StrictStr, + feature_service_reset_organization_features_request: FeatureServiceResetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1479,12 +1511,12 @@ def feature_service_reset_organization_features_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[FeatureServiceResetOrganizationFeaturesResponse]: - """Reset Organization Features + """ResetOrganizationFeatures - Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete + 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 feature_service_reset_organization_features_request: (required) + :type feature_service_reset_organization_features_request: FeatureServiceResetOrganizationFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1507,8 +1539,8 @@ def feature_service_reset_organization_features_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_reset_organization_features_serialize( - organization_id=organization_id, + _param = self._reset_organization_features_serialize( + feature_service_reset_organization_features_request=feature_service_reset_organization_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1517,8 +1549,6 @@ def feature_service_reset_organization_features_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1532,9 +1562,9 @@ def feature_service_reset_organization_features_with_http_info( @validate_call - def feature_service_reset_organization_features_without_preload_content( + def reset_organization_features_without_preload_content( self, - organization_id: StrictStr, + feature_service_reset_organization_features_request: FeatureServiceResetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1548,12 +1578,12 @@ def feature_service_reset_organization_features_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Reset Organization Features + """ResetOrganizationFeatures - Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete + 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 feature_service_reset_organization_features_request: (required) + :type feature_service_reset_organization_features_request: FeatureServiceResetOrganizationFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1576,8 +1606,8 @@ def feature_service_reset_organization_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_reset_organization_features_serialize( - organization_id=organization_id, + _param = self._reset_organization_features_serialize( + feature_service_reset_organization_features_request=feature_service_reset_organization_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1586,8 +1616,6 @@ def feature_service_reset_organization_features_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1596,9 +1624,9 @@ def feature_service_reset_organization_features_without_preload_content( return response_data.response - def _feature_service_reset_organization_features_serialize( + def _reset_organization_features_serialize( self, - organization_id, + feature_service_reset_organization_features_request, _request_auth, _content_type, _headers, @@ -1620,12 +1648,12 @@ def _feature_service_reset_organization_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 # process the header parameters # process the form parameters # process the body parameter + if feature_service_reset_organization_features_request is not None: + _body_params = feature_service_reset_organization_features_request # set the HTTP header `Accept` @@ -1636,6 +1664,19 @@ def _feature_service_reset_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] = [ @@ -1643,8 +1684,8 @@ def _feature_service_reset_organization_features_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/features/organization/{organizationId}', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/ResetOrganizationFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1661,8 +1702,9 @@ def _feature_service_reset_organization_features_serialize( @validate_call - def feature_service_reset_system_features( + def reset_system_features( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1676,10 +1718,12 @@ def feature_service_reset_system_features( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceResetSystemFeaturesResponse: - """Reset System Features + """ResetSystemFeatures - Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete + Reset System Features Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1702,7 +1746,8 @@ def feature_service_reset_system_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_reset_system_features_serialize( + _param = self._reset_system_features_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1711,8 +1756,6 @@ def feature_service_reset_system_features( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1726,8 +1769,9 @@ def feature_service_reset_system_features( @validate_call - def feature_service_reset_system_features_with_http_info( + def reset_system_features_with_http_info( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1741,10 +1785,12 @@ def feature_service_reset_system_features_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[FeatureServiceResetSystemFeaturesResponse]: - """Reset System Features + """ResetSystemFeatures - Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete + Reset System Features Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1767,7 +1813,8 @@ def feature_service_reset_system_features_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_reset_system_features_serialize( + _param = self._reset_system_features_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1776,8 +1823,6 @@ def feature_service_reset_system_features_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1791,8 +1836,9 @@ def feature_service_reset_system_features_with_http_info( @validate_call - def feature_service_reset_system_features_without_preload_content( + def reset_system_features_without_preload_content( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1806,10 +1852,12 @@ def feature_service_reset_system_features_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Reset System Features + """ResetSystemFeatures - Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete + Reset System Features Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1832,7 +1880,8 @@ def feature_service_reset_system_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_reset_system_features_serialize( + _param = self._reset_system_features_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1841,8 +1890,6 @@ def feature_service_reset_system_features_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1851,8 +1898,9 @@ def feature_service_reset_system_features_without_preload_content( return response_data.response - def _feature_service_reset_system_features_serialize( + def _reset_system_features_serialize( self, + body, _request_auth, _content_type, _headers, @@ -1878,6 +1926,8 @@ def _feature_service_reset_system_features_serialize( # process the header parameters # process the form parameters # process the body parameter + if body is not None: + _body_params = body # set the HTTP header `Accept` @@ -1888,6 +1938,19 @@ def _feature_service_reset_system_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] = [ @@ -1895,8 +1958,8 @@ def _feature_service_reset_system_features_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/features/system', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/ResetSystemFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1913,9 +1976,9 @@ def _feature_service_reset_system_features_serialize( @validate_call - def feature_service_reset_user_features( + def reset_user_features( self, - user_id: StrictStr, + feature_service_reset_user_features_request: FeatureServiceResetUserFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1929,12 +1992,12 @@ def feature_service_reset_user_features( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceResetUserFeaturesResponse: - """Reset User Features + """ResetUserFeatures - Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete + 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 feature_service_reset_user_features_request: (required) + :type feature_service_reset_user_features_request: FeatureServiceResetUserFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1957,8 +2020,8 @@ def feature_service_reset_user_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_reset_user_features_serialize( - user_id=user_id, + _param = self._reset_user_features_serialize( + feature_service_reset_user_features_request=feature_service_reset_user_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1967,8 +2030,6 @@ def feature_service_reset_user_features( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1982,9 +2043,9 @@ def feature_service_reset_user_features( @validate_call - def feature_service_reset_user_features_with_http_info( + def reset_user_features_with_http_info( self, - user_id: StrictStr, + feature_service_reset_user_features_request: FeatureServiceResetUserFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1998,12 +2059,12 @@ def feature_service_reset_user_features_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[FeatureServiceResetUserFeaturesResponse]: - """Reset User Features + """ResetUserFeatures - Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete + 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 feature_service_reset_user_features_request: (required) + :type feature_service_reset_user_features_request: FeatureServiceResetUserFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2026,8 +2087,8 @@ def feature_service_reset_user_features_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_reset_user_features_serialize( - user_id=user_id, + _param = self._reset_user_features_serialize( + feature_service_reset_user_features_request=feature_service_reset_user_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2036,8 +2097,6 @@ def feature_service_reset_user_features_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2051,9 +2110,9 @@ def feature_service_reset_user_features_with_http_info( @validate_call - def feature_service_reset_user_features_without_preload_content( + def reset_user_features_without_preload_content( self, - user_id: StrictStr, + feature_service_reset_user_features_request: FeatureServiceResetUserFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2067,12 +2126,12 @@ def feature_service_reset_user_features_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Reset User Features + """ResetUserFeatures - Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete + 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 feature_service_reset_user_features_request: (required) + :type feature_service_reset_user_features_request: FeatureServiceResetUserFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2095,8 +2154,8 @@ def feature_service_reset_user_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_reset_user_features_serialize( - user_id=user_id, + _param = self._reset_user_features_serialize( + feature_service_reset_user_features_request=feature_service_reset_user_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2105,8 +2164,6 @@ def feature_service_reset_user_features_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2115,9 +2172,9 @@ def feature_service_reset_user_features_without_preload_content( return response_data.response - def _feature_service_reset_user_features_serialize( + def _reset_user_features_serialize( self, - user_id, + feature_service_reset_user_features_request, _request_auth, _content_type, _headers, @@ -2139,12 +2196,12 @@ def _feature_service_reset_user_features_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 feature_service_reset_user_features_request is not None: + _body_params = feature_service_reset_user_features_request # set the HTTP header `Accept` @@ -2155,6 +2212,19 @@ def _feature_service_reset_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] = [ @@ -2162,8 +2232,8 @@ def _feature_service_reset_user_features_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/features/user/{userId}', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/ResetUserFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2180,7 +2250,7 @@ def _feature_service_reset_user_features_serialize( @validate_call - def feature_service_set_instance_features( + def set_instance_features( self, feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest, _request_timeout: Union[ @@ -2196,9 +2266,9 @@ def feature_service_set_instance_features( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceSetInstanceFeaturesResponse: - """Set Instance Features + """SetInstanceFeatures - 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 + 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 @@ -2224,7 +2294,7 @@ def feature_service_set_instance_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_instance_features_serialize( + _param = self._set_instance_features_serialize( feature_service_set_instance_features_request=feature_service_set_instance_features_request, _request_auth=_request_auth, _content_type=_content_type, @@ -2234,8 +2304,6 @@ def feature_service_set_instance_features( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2249,7 +2317,7 @@ def feature_service_set_instance_features( @validate_call - def feature_service_set_instance_features_with_http_info( + def set_instance_features_with_http_info( self, feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest, _request_timeout: Union[ @@ -2265,9 +2333,9 @@ def feature_service_set_instance_features_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[FeatureServiceSetInstanceFeaturesResponse]: - """Set Instance Features + """SetInstanceFeatures - 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 + 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 @@ -2293,7 +2361,7 @@ def feature_service_set_instance_features_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_instance_features_serialize( + _param = self._set_instance_features_serialize( feature_service_set_instance_features_request=feature_service_set_instance_features_request, _request_auth=_request_auth, _content_type=_content_type, @@ -2303,8 +2371,6 @@ def feature_service_set_instance_features_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2318,7 +2384,7 @@ def feature_service_set_instance_features_with_http_info( @validate_call - def feature_service_set_instance_features_without_preload_content( + def set_instance_features_without_preload_content( self, feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest, _request_timeout: Union[ @@ -2334,9 +2400,9 @@ def feature_service_set_instance_features_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Set Instance Features + """SetInstanceFeatures - 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 + 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 @@ -2362,7 +2428,7 @@ def feature_service_set_instance_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_instance_features_serialize( + _param = self._set_instance_features_serialize( feature_service_set_instance_features_request=feature_service_set_instance_features_request, _request_auth=_request_auth, _content_type=_content_type, @@ -2372,8 +2438,6 @@ def feature_service_set_instance_features_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2382,7 +2446,7 @@ def feature_service_set_instance_features_without_preload_content( return response_data.response - def _feature_service_set_instance_features_serialize( + def _set_instance_features_serialize( self, feature_service_set_instance_features_request, _request_auth, @@ -2442,8 +2506,8 @@ def _feature_service_set_instance_features_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/features/instance', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/SetInstanceFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2460,9 +2524,9 @@ def _feature_service_set_instance_features_serialize( @validate_call - def feature_service_set_organization_features( + def set_organization_features( self, - organization_id: StrictStr, + feature_service_set_organization_features_request: FeatureServiceSetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2476,12 +2540,12 @@ def feature_service_set_organization_features( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceSetOrganizationFeaturesResponse: - """Set Organization Features + """SetOrganizationFeatures - 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 + 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 feature_service_set_organization_features_request: (required) + :type feature_service_set_organization_features_request: FeatureServiceSetOrganizationFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2504,8 +2568,8 @@ def feature_service_set_organization_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_organization_features_serialize( - organization_id=organization_id, + _param = self._set_organization_features_serialize( + feature_service_set_organization_features_request=feature_service_set_organization_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2514,8 +2578,6 @@ def feature_service_set_organization_features( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2529,9 +2591,9 @@ def feature_service_set_organization_features( @validate_call - def feature_service_set_organization_features_with_http_info( + def set_organization_features_with_http_info( self, - organization_id: StrictStr, + feature_service_set_organization_features_request: FeatureServiceSetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2545,12 +2607,12 @@ def feature_service_set_organization_features_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[FeatureServiceSetOrganizationFeaturesResponse]: - """Set Organization Features + """SetOrganizationFeatures - 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 + 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 feature_service_set_organization_features_request: (required) + :type feature_service_set_organization_features_request: FeatureServiceSetOrganizationFeaturesRequest :param _request_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 +2635,8 @@ 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._set_organization_features_serialize( + feature_service_set_organization_features_request=feature_service_set_organization_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2583,8 +2645,6 @@ def feature_service_set_organization_features_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2598,9 +2658,9 @@ def feature_service_set_organization_features_with_http_info( @validate_call - def feature_service_set_organization_features_without_preload_content( + def set_organization_features_without_preload_content( self, - organization_id: StrictStr, + feature_service_set_organization_features_request: FeatureServiceSetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2614,12 +2674,12 @@ def feature_service_set_organization_features_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Set Organization Features + """SetOrganizationFeatures - 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 + 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 feature_service_set_organization_features_request: (required) + :type feature_service_set_organization_features_request: FeatureServiceSetOrganizationFeaturesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2642,8 +2702,8 @@ def feature_service_set_organization_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_organization_features_serialize( - organization_id=organization_id, + _param = self._set_organization_features_serialize( + feature_service_set_organization_features_request=feature_service_set_organization_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2652,8 +2712,6 @@ def feature_service_set_organization_features_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2662,9 +2720,9 @@ def feature_service_set_organization_features_without_preload_content( return response_data.response - def _feature_service_set_organization_features_serialize( + def _set_organization_features_serialize( self, - organization_id, + feature_service_set_organization_features_request, _request_auth, _content_type, _headers, @@ -2686,12 +2744,12 @@ def _feature_service_set_organization_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 # process the header parameters # process the form parameters # process the body parameter + if feature_service_set_organization_features_request is not None: + _body_params = feature_service_set_organization_features_request # set the HTTP header `Accept` @@ -2722,8 +2780,8 @@ def _feature_service_set_organization_features_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/features/organization/{organizationId}', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/SetOrganizationFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2740,7 +2798,7 @@ def _feature_service_set_organization_features_serialize( @validate_call - def feature_service_set_system_features( + def set_system_features( self, feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest, _request_timeout: Union[ @@ -2756,9 +2814,9 @@ def feature_service_set_system_features( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceSetSystemFeaturesResponse: - """Set System Features + """SetSystemFeatures - 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 + Set 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 :param feature_service_set_system_features_request: (required) :type feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest @@ -2784,7 +2842,7 @@ def feature_service_set_system_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_system_features_serialize( + _param = self._set_system_features_serialize( feature_service_set_system_features_request=feature_service_set_system_features_request, _request_auth=_request_auth, _content_type=_content_type, @@ -2794,8 +2852,6 @@ def feature_service_set_system_features( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2809,7 +2865,7 @@ def feature_service_set_system_features( @validate_call - def feature_service_set_system_features_with_http_info( + def set_system_features_with_http_info( self, feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest, _request_timeout: Union[ @@ -2825,9 +2881,9 @@ def feature_service_set_system_features_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[FeatureServiceSetSystemFeaturesResponse]: - """Set System Features + """SetSystemFeatures - 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 + Set 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 :param feature_service_set_system_features_request: (required) :type feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest @@ -2853,7 +2909,7 @@ def feature_service_set_system_features_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_system_features_serialize( + _param = self._set_system_features_serialize( feature_service_set_system_features_request=feature_service_set_system_features_request, _request_auth=_request_auth, _content_type=_content_type, @@ -2863,8 +2919,6 @@ def feature_service_set_system_features_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2878,7 +2932,7 @@ def feature_service_set_system_features_with_http_info( @validate_call - def feature_service_set_system_features_without_preload_content( + def set_system_features_without_preload_content( self, feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest, _request_timeout: Union[ @@ -2894,9 +2948,9 @@ def feature_service_set_system_features_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Set System Features + """SetSystemFeatures - 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 + Set 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 :param feature_service_set_system_features_request: (required) :type feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest @@ -2922,7 +2976,7 @@ def feature_service_set_system_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_system_features_serialize( + _param = self._set_system_features_serialize( feature_service_set_system_features_request=feature_service_set_system_features_request, _request_auth=_request_auth, _content_type=_content_type, @@ -2932,8 +2986,6 @@ def feature_service_set_system_features_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2942,7 +2994,7 @@ def feature_service_set_system_features_without_preload_content( return response_data.response - def _feature_service_set_system_features_serialize( + def _set_system_features_serialize( self, feature_service_set_system_features_request, _request_auth, @@ -3002,8 +3054,8 @@ def _feature_service_set_system_features_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/features/system', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/SetSystemFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3020,9 +3072,9 @@ def _feature_service_set_system_features_serialize( @validate_call - def feature_service_set_user_features( + def set_user_features( self, - user_id: StrictStr, + feature_service_set_user_feature_request: FeatureServiceSetUserFeatureRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3036,12 +3088,12 @@ def feature_service_set_user_features( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceSetUserFeaturesResponse: - """Set User Features + """SetUserFeatures - Configure and set features that apply to an user. Only fields present in the request are set or unset. Required permissions: - user.feature.write + 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 - :param user_id: (required) - :type user_id: str + :param feature_service_set_user_feature_request: (required) + :type feature_service_set_user_feature_request: FeatureServiceSetUserFeatureRequest :param _request_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 +3116,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._set_user_features_serialize( + feature_service_set_user_feature_request=feature_service_set_user_feature_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3074,8 +3126,6 @@ def feature_service_set_user_features( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3089,9 +3139,9 @@ def feature_service_set_user_features( @validate_call - def feature_service_set_user_features_with_http_info( + def set_user_features_with_http_info( self, - user_id: StrictStr, + feature_service_set_user_feature_request: FeatureServiceSetUserFeatureRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3105,12 +3155,12 @@ def feature_service_set_user_features_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[FeatureServiceSetUserFeaturesResponse]: - """Set User Features + """SetUserFeatures - Configure and set features that apply to an user. Only fields present in the request are set or unset. Required permissions: - user.feature.write + 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 - :param user_id: (required) - :type user_id: str + :param feature_service_set_user_feature_request: (required) + :type feature_service_set_user_feature_request: FeatureServiceSetUserFeatureRequest :param _request_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 +3183,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._set_user_features_serialize( + feature_service_set_user_feature_request=feature_service_set_user_feature_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3143,8 +3193,6 @@ def feature_service_set_user_features_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3158,9 +3206,9 @@ def feature_service_set_user_features_with_http_info( @validate_call - def feature_service_set_user_features_without_preload_content( + def set_user_features_without_preload_content( self, - user_id: StrictStr, + feature_service_set_user_feature_request: FeatureServiceSetUserFeatureRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3174,12 +3222,12 @@ def feature_service_set_user_features_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Set User Features + """SetUserFeatures - Configure and set features that apply to an user. Only fields present in the request are set or unset. Required permissions: - user.feature.write + 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 - :param user_id: (required) - :type user_id: str + :param feature_service_set_user_feature_request: (required) + :type feature_service_set_user_feature_request: FeatureServiceSetUserFeatureRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3202,8 +3250,8 @@ def feature_service_set_user_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_user_features_serialize( - user_id=user_id, + _param = self._set_user_features_serialize( + feature_service_set_user_feature_request=feature_service_set_user_feature_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3212,8 +3260,6 @@ def feature_service_set_user_features_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3222,9 +3268,9 @@ def feature_service_set_user_features_without_preload_content( return response_data.response - def _feature_service_set_user_features_serialize( + def _set_user_features_serialize( self, - user_id, + feature_service_set_user_feature_request, _request_auth, _content_type, _headers, @@ -3246,12 +3292,12 @@ def _feature_service_set_user_features_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 feature_service_set_user_feature_request is not None: + _body_params = feature_service_set_user_feature_request # set the HTTP header `Accept` @@ -3282,8 +3328,8 @@ def _feature_service_set_user_features_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/features/user/{userId}', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/SetUserFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/identity_provider_service_api.py b/zitadel_client/api/identity_provider_service_api.py index f8c82b16..8c020e66 100644 --- a/zitadel_client/api/identity_provider_service_api.py +++ b/zitadel_client/api/identity_provider_service_api.py @@ -16,8 +16,9 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from zitadel_client.models.identity_provider_service_get_idpby_id_request import IdentityProviderServiceGetIDPByIDRequest from zitadel_client.models.identity_provider_service_get_idpby_id_response import IdentityProviderServiceGetIDPByIDResponse +from zitadel_client.models.no_op200_response import NoOp200Response from zitadel_client.api_client import ApiClient, RequestSerialized from zitadel_client.api_response import ApiResponse @@ -38,9 +39,9 @@ def __init__(self, api_client=None) -> None: @validate_call - def identity_provider_service_get_idpby_id( + def get_idpby_id( self, - id: StrictStr, + identity_provider_service_get_idpby_id_request: IdentityProviderServiceGetIDPByIDRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -54,12 +55,12 @@ def identity_provider_service_get_idpby_id( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> IdentityProviderServiceGetIDPByIDResponse: - """Get identity provider (IdP) by ID + """GetIDPByID - Returns an identity provider (social/enterprise login) by its ID, which can be of the type Google, AzureAD, etc. + 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 identity_provider_service_get_idpby_id_request: (required) + :type identity_provider_service_get_idpby_id_request: IdentityProviderServiceGetIDPByIDRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -82,8 +83,8 @@ def identity_provider_service_get_idpby_id( :return: Returns the result object. """ # noqa: E501 - _param = self._identity_provider_service_get_idpby_id_serialize( - id=id, + _param = self._get_idpby_id_serialize( + identity_provider_service_get_idpby_id_request=identity_provider_service_get_idpby_id_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -92,8 +93,6 @@ def identity_provider_service_get_idpby_id( _response_types_map: Dict[str, Optional[str]] = { '200': "IdentityProviderServiceGetIDPByIDResponse", - '403': "IdentityProviderServiceRpcStatus", - '404': "IdentityProviderServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -107,9 +106,9 @@ def identity_provider_service_get_idpby_id( @validate_call - def identity_provider_service_get_idpby_id_with_http_info( + def get_idpby_id_with_http_info( self, - id: StrictStr, + identity_provider_service_get_idpby_id_request: IdentityProviderServiceGetIDPByIDRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -123,12 +122,12 @@ def identity_provider_service_get_idpby_id_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[IdentityProviderServiceGetIDPByIDResponse]: - """Get identity provider (IdP) by ID + """GetIDPByID - Returns an identity provider (social/enterprise login) by its ID, which can be of the type Google, AzureAD, etc. + 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 identity_provider_service_get_idpby_id_request: (required) + :type identity_provider_service_get_idpby_id_request: IdentityProviderServiceGetIDPByIDRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -151,8 +150,8 @@ def identity_provider_service_get_idpby_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._identity_provider_service_get_idpby_id_serialize( - id=id, + _param = self._get_idpby_id_serialize( + identity_provider_service_get_idpby_id_request=identity_provider_service_get_idpby_id_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -161,8 +160,6 @@ def identity_provider_service_get_idpby_id_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "IdentityProviderServiceGetIDPByIDResponse", - '403': "IdentityProviderServiceRpcStatus", - '404': "IdentityProviderServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -176,9 +173,9 @@ def identity_provider_service_get_idpby_id_with_http_info( @validate_call - def identity_provider_service_get_idpby_id_without_preload_content( + def get_idpby_id_without_preload_content( self, - id: StrictStr, + identity_provider_service_get_idpby_id_request: IdentityProviderServiceGetIDPByIDRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -192,12 +189,12 @@ def identity_provider_service_get_idpby_id_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get identity provider (IdP) by ID + """GetIDPByID - Returns an identity provider (social/enterprise login) by its ID, which can be of the type Google, AzureAD, etc. + 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 identity_provider_service_get_idpby_id_request: (required) + :type identity_provider_service_get_idpby_id_request: IdentityProviderServiceGetIDPByIDRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -220,8 +217,8 @@ def identity_provider_service_get_idpby_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._identity_provider_service_get_idpby_id_serialize( - id=id, + _param = self._get_idpby_id_serialize( + identity_provider_service_get_idpby_id_request=identity_provider_service_get_idpby_id_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -230,8 +227,6 @@ def identity_provider_service_get_idpby_id_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "IdentityProviderServiceGetIDPByIDResponse", - '403': "IdentityProviderServiceRpcStatus", - '404': "IdentityProviderServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -240,9 +235,267 @@ def identity_provider_service_get_idpby_id_without_preload_content( return response_data.response - def _identity_provider_service_get_idpby_id_serialize( + def _get_idpby_id_serialize( + self, + identity_provider_service_get_idpby_id_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 identity_provider_service_get_idpby_id_request is not None: + _body_params = identity_provider_service_get_idpby_id_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.idp.v2.IdentityProviderService/GetIDPByID', + 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 no_op( + 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, + ) -> NoOp200Response: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response", + } + 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 no_op_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[NoOp200Response]: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response", + } + 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 no_op_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: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _no_op_serialize( self, - id, _request_auth, _content_type, _headers, @@ -264,8 +517,6 @@ def _identity_provider_service_get_idpby_id_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 @@ -288,7 +539,7 @@ def _identity_provider_service_get_idpby_id_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/idps/{id}', + resource_path='/8f3c9d63', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/oidc_service_api.py b/zitadel_client/api/oidc_service_api.py index 44789c09..6810524d 100644 --- a/zitadel_client/api/oidc_service_api.py +++ b/zitadel_client/api/oidc_service_api.py @@ -16,13 +16,14 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr from typing import Any, Dict -from typing_extensions import Annotated +from zitadel_client.models.no_op200_response6 import NoOp200Response6 from zitadel_client.models.oidc_service_authorize_or_deny_device_authorization_request import OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest from zitadel_client.models.oidc_service_create_callback_request import OIDCServiceCreateCallbackRequest from zitadel_client.models.oidc_service_create_callback_response import OIDCServiceCreateCallbackResponse +from zitadel_client.models.oidc_service_get_auth_request_request import OIDCServiceGetAuthRequestRequest from zitadel_client.models.oidc_service_get_auth_request_response import OIDCServiceGetAuthRequestResponse +from zitadel_client.models.oidc_service_get_device_authorization_request_request import OIDCServiceGetDeviceAuthorizationRequestRequest from zitadel_client.models.oidc_service_get_device_authorization_request_response import OIDCServiceGetDeviceAuthorizationRequestResponse from zitadel_client.api_client import ApiClient, RequestSerialized @@ -44,9 +45,8 @@ def __init__(self, api_client=None) -> None: @validate_call - def o_idc_service_authorize_or_deny_device_authorization( + def authorize_or_deny_device_authorization( 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, @@ -61,12 +61,10 @@ def o_idc_service_authorize_or_deny_device_authorization( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> object: - """Authorize or deny device authorization + """AuthorizeOrDenyDeviceAuthorization - Authorize or deny the device authorization request based on the provided device authorization id. + 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 @@ -91,8 +89,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( - device_authorization_id=device_authorization_id, + _param = self._authorize_or_deny_device_authorization_serialize( oidc_service_authorize_or_deny_device_authorization_request=oidc_service_authorize_or_deny_device_authorization_request, _request_auth=_request_auth, _content_type=_content_type, @@ -102,8 +99,6 @@ def o_idc_service_authorize_or_deny_device_authorization( _response_types_map: Dict[str, Optional[str]] = { '200': "object", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -117,9 +112,8 @@ def o_idc_service_authorize_or_deny_device_authorization( @validate_call - def o_idc_service_authorize_or_deny_device_authorization_with_http_info( + def 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, @@ -134,12 +128,10 @@ def o_idc_service_authorize_or_deny_device_authorization_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[object]: - """Authorize or deny device authorization + """AuthorizeOrDenyDeviceAuthorization - Authorize or deny the device authorization request based on the provided device authorization id. + 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 @@ -164,8 +156,7 @@ def o_idc_service_authorize_or_deny_device_authorization_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._o_idc_service_authorize_or_deny_device_authorization_serialize( - device_authorization_id=device_authorization_id, + _param = self._authorize_or_deny_device_authorization_serialize( oidc_service_authorize_or_deny_device_authorization_request=oidc_service_authorize_or_deny_device_authorization_request, _request_auth=_request_auth, _content_type=_content_type, @@ -175,8 +166,6 @@ def o_idc_service_authorize_or_deny_device_authorization_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "object", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -190,9 +179,8 @@ def o_idc_service_authorize_or_deny_device_authorization_with_http_info( @validate_call - def o_idc_service_authorize_or_deny_device_authorization_without_preload_content( + def 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, @@ -207,12 +195,10 @@ def o_idc_service_authorize_or_deny_device_authorization_without_preload_content _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Authorize or deny device authorization + """AuthorizeOrDenyDeviceAuthorization - Authorize or deny the device authorization request based on the provided device authorization id. + 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 @@ -237,8 +223,7 @@ def o_idc_service_authorize_or_deny_device_authorization_without_preload_content :return: Returns the result object. """ # noqa: E501 - _param = self._o_idc_service_authorize_or_deny_device_authorization_serialize( - device_authorization_id=device_authorization_id, + _param = self._authorize_or_deny_device_authorization_serialize( oidc_service_authorize_or_deny_device_authorization_request=oidc_service_authorize_or_deny_device_authorization_request, _request_auth=_request_auth, _content_type=_content_type, @@ -248,8 +233,6 @@ def o_idc_service_authorize_or_deny_device_authorization_without_preload_content _response_types_map: Dict[str, Optional[str]] = { '200': "object", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -258,9 +241,8 @@ def o_idc_service_authorize_or_deny_device_authorization_without_preload_content return response_data.response - def _o_idc_service_authorize_or_deny_device_authorization_serialize( + def _authorize_or_deny_device_authorization_serialize( self, - device_authorization_id, oidc_service_authorize_or_deny_device_authorization_request, _request_auth, _content_type, @@ -283,8 +265,6 @@ def _o_idc_service_authorize_or_deny_device_authorization_serialize( _body_params: Optional[bytes] = None # process the path parameters - if device_authorization_id is not None: - _path_params['deviceAuthorizationId'] = device_authorization_id # process the query parameters # process the header parameters # process the form parameters @@ -322,7 +302,7 @@ def _o_idc_service_authorize_or_deny_device_authorization_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/oidc/device_authorization/{deviceAuthorizationId}', + resource_path='/zitadel.oidc.v2.OIDCService/AuthorizeOrDenyDeviceAuthorization', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -339,9 +319,8 @@ def _o_idc_service_authorize_or_deny_device_authorization_serialize( @validate_call - def o_idc_service_create_callback( + def 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, @@ -356,12 +335,9 @@ def o_idc_service_create_callback( _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. + """CreateCallback - 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 @@ -386,8 +362,7 @@ def o_idc_service_create_callback( :return: Returns the result object. """ # noqa: E501 - _param = self._o_idc_service_create_callback_serialize( - auth_request_id=auth_request_id, + _param = self._create_callback_serialize( oidc_service_create_callback_request=oidc_service_create_callback_request, _request_auth=_request_auth, _content_type=_content_type, @@ -397,8 +372,6 @@ def o_idc_service_create_callback( _response_types_map: Dict[str, Optional[str]] = { '200': "OIDCServiceCreateCallbackResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -412,9 +385,8 @@ def o_idc_service_create_callback( @validate_call - def o_idc_service_create_callback_with_http_info( + def 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, @@ -429,12 +401,9 @@ def o_idc_service_create_callback_with_http_info( _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. + """CreateCallback - 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 @@ -459,8 +428,7 @@ def o_idc_service_create_callback_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._o_idc_service_create_callback_serialize( - auth_request_id=auth_request_id, + _param = self._create_callback_serialize( oidc_service_create_callback_request=oidc_service_create_callback_request, _request_auth=_request_auth, _content_type=_content_type, @@ -470,8 +438,6 @@ def o_idc_service_create_callback_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "OIDCServiceCreateCallbackResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -485,9 +451,8 @@ def o_idc_service_create_callback_with_http_info( @validate_call - def o_idc_service_create_callback_without_preload_content( + def 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, @@ -502,12 +467,9 @@ def o_idc_service_create_callback_without_preload_content( _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. + """CreateCallback - 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 @@ -532,8 +494,7 @@ def o_idc_service_create_callback_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._o_idc_service_create_callback_serialize( - auth_request_id=auth_request_id, + _param = self._create_callback_serialize( oidc_service_create_callback_request=oidc_service_create_callback_request, _request_auth=_request_auth, _content_type=_content_type, @@ -543,8 +504,6 @@ def o_idc_service_create_callback_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "OIDCServiceCreateCallbackResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -553,9 +512,8 @@ def o_idc_service_create_callback_without_preload_content( return response_data.response - def _o_idc_service_create_callback_serialize( + def _create_callback_serialize( self, - auth_request_id, oidc_service_create_callback_request, _request_auth, _content_type, @@ -578,8 +536,6 @@ def _o_idc_service_create_callback_serialize( _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 @@ -617,7 +573,7 @@ def _o_idc_service_create_callback_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/oidc/auth_requests/{authRequestId}', + resource_path='/zitadel.oidc.v2.OIDCService/CreateCallback', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -634,9 +590,9 @@ def _o_idc_service_create_callback_serialize( @validate_call - def o_idc_service_get_auth_request( + def get_auth_request( self, - auth_request_id: Annotated[StrictStr, Field(description="ID of the Auth Request, as obtained from the redirect URL.")], + oidc_service_get_auth_request_request: OIDCServiceGetAuthRequestRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -650,12 +606,11 @@ def o_idc_service_get_auth_request( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> OIDCServiceGetAuthRequestResponse: - """Get OIDC Auth Request details + """GetAuthRequest - 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 oidc_service_get_auth_request_request: (required) + :type oidc_service_get_auth_request_request: OIDCServiceGetAuthRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -678,8 +633,8 @@ def o_idc_service_get_auth_request( :return: Returns the result object. """ # noqa: E501 - _param = self._o_idc_service_get_auth_request_serialize( - auth_request_id=auth_request_id, + _param = self._get_auth_request_serialize( + oidc_service_get_auth_request_request=oidc_service_get_auth_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -688,8 +643,6 @@ def o_idc_service_get_auth_request( _response_types_map: Dict[str, Optional[str]] = { '200': "OIDCServiceGetAuthRequestResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -703,9 +656,9 @@ def o_idc_service_get_auth_request( @validate_call - def o_idc_service_get_auth_request_with_http_info( + def get_auth_request_with_http_info( self, - auth_request_id: Annotated[StrictStr, Field(description="ID of the Auth Request, as obtained from the redirect URL.")], + oidc_service_get_auth_request_request: OIDCServiceGetAuthRequestRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -719,12 +672,11 @@ def o_idc_service_get_auth_request_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[OIDCServiceGetAuthRequestResponse]: - """Get OIDC Auth Request details + """GetAuthRequest - 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 oidc_service_get_auth_request_request: (required) + :type oidc_service_get_auth_request_request: OIDCServiceGetAuthRequestRequest :param _request_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 +699,8 @@ 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( - auth_request_id=auth_request_id, + _param = self._get_auth_request_serialize( + oidc_service_get_auth_request_request=oidc_service_get_auth_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -757,8 +709,6 @@ def o_idc_service_get_auth_request_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "OIDCServiceGetAuthRequestResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -772,9 +722,9 @@ def o_idc_service_get_auth_request_with_http_info( @validate_call - def o_idc_service_get_auth_request_without_preload_content( + def get_auth_request_without_preload_content( self, - auth_request_id: Annotated[StrictStr, Field(description="ID of the Auth Request, as obtained from the redirect URL.")], + oidc_service_get_auth_request_request: OIDCServiceGetAuthRequestRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -788,12 +738,11 @@ def o_idc_service_get_auth_request_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get OIDC Auth Request details + """GetAuthRequest - 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 oidc_service_get_auth_request_request: (required) + :type oidc_service_get_auth_request_request: OIDCServiceGetAuthRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -816,8 +765,8 @@ 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( - auth_request_id=auth_request_id, + _param = self._get_auth_request_serialize( + oidc_service_get_auth_request_request=oidc_service_get_auth_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -826,8 +775,6 @@ def o_idc_service_get_auth_request_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "OIDCServiceGetAuthRequestResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -836,9 +783,9 @@ def o_idc_service_get_auth_request_without_preload_content( return response_data.response - def _o_idc_service_get_auth_request_serialize( + def _get_auth_request_serialize( self, - auth_request_id, + oidc_service_get_auth_request_request, _request_auth, _content_type, _headers, @@ -860,12 +807,12 @@ def _o_idc_service_get_auth_request_serialize( _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_get_auth_request_request is not None: + _body_params = oidc_service_get_auth_request_request # set the HTTP header `Accept` @@ -876,6 +823,19 @@ def _o_idc_service_get_auth_request_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] = [ @@ -883,8 +843,8 @@ def _o_idc_service_get_auth_request_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/oidc/auth_requests/{authRequestId}', + method='POST', + resource_path='/zitadel.oidc.v2.OIDCService/GetAuthRequest', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -901,9 +861,9 @@ def _o_idc_service_get_auth_request_serialize( @validate_call - def o_idc_service_get_device_authorization_request( + def get_device_authorization_request( self, - user_code: Annotated[StrictStr, Field(description="The user_code returned by the device authorization request and provided to the user by the device.")], + oidc_service_get_device_authorization_request_request: OIDCServiceGetDeviceAuthorizationRequestRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -917,12 +877,12 @@ def o_idc_service_get_device_authorization_request( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> OIDCServiceGetDeviceAuthorizationRequestResponse: - """Get device authorization request + """GetDeviceAuthorizationRequest - 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. + 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 oidc_service_get_device_authorization_request_request: (required) + :type oidc_service_get_device_authorization_request_request: OIDCServiceGetDeviceAuthorizationRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -945,8 +905,8 @@ 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( - user_code=user_code, + _param = self._get_device_authorization_request_serialize( + oidc_service_get_device_authorization_request_request=oidc_service_get_device_authorization_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -955,8 +915,6 @@ def o_idc_service_get_device_authorization_request( _response_types_map: Dict[str, Optional[str]] = { '200': "OIDCServiceGetDeviceAuthorizationRequestResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -970,9 +928,9 @@ def o_idc_service_get_device_authorization_request( @validate_call - def o_idc_service_get_device_authorization_request_with_http_info( + def 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.")], + oidc_service_get_device_authorization_request_request: OIDCServiceGetDeviceAuthorizationRequestRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -986,12 +944,12 @@ def o_idc_service_get_device_authorization_request_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[OIDCServiceGetDeviceAuthorizationRequestResponse]: - """Get device authorization request + """GetDeviceAuthorizationRequest - 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. + 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 oidc_service_get_device_authorization_request_request: (required) + :type oidc_service_get_device_authorization_request_request: OIDCServiceGetDeviceAuthorizationRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1014,8 +972,8 @@ def o_idc_service_get_device_authorization_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._o_idc_service_get_device_authorization_request_serialize( - user_code=user_code, + _param = self._get_device_authorization_request_serialize( + oidc_service_get_device_authorization_request_request=oidc_service_get_device_authorization_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1024,8 +982,6 @@ def o_idc_service_get_device_authorization_request_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "OIDCServiceGetDeviceAuthorizationRequestResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1039,9 +995,9 @@ def o_idc_service_get_device_authorization_request_with_http_info( @validate_call - def o_idc_service_get_device_authorization_request_without_preload_content( + def 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.")], + oidc_service_get_device_authorization_request_request: OIDCServiceGetDeviceAuthorizationRequestRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1055,12 +1011,12 @@ def o_idc_service_get_device_authorization_request_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get device authorization request + """GetDeviceAuthorizationRequest - 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. + 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 oidc_service_get_device_authorization_request_request: (required) + :type oidc_service_get_device_authorization_request_request: OIDCServiceGetDeviceAuthorizationRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1083,8 +1039,8 @@ def o_idc_service_get_device_authorization_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._o_idc_service_get_device_authorization_request_serialize( - user_code=user_code, + _param = self._get_device_authorization_request_serialize( + oidc_service_get_device_authorization_request_request=oidc_service_get_device_authorization_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1093,8 +1049,6 @@ def o_idc_service_get_device_authorization_request_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "OIDCServiceGetDeviceAuthorizationRequestResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1103,9 +1057,267 @@ def o_idc_service_get_device_authorization_request_without_preload_content( return response_data.response - def _o_idc_service_get_device_authorization_request_serialize( + def _get_device_authorization_request_serialize( + self, + oidc_service_get_device_authorization_request_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 oidc_service_get_device_authorization_request_request is not None: + _body_params = oidc_service_get_device_authorization_request_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.oidc.v2.OIDCService/GetDeviceAuthorizationRequest', + 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 no_op( + 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, + ) -> NoOp200Response6: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response6", + } + 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 no_op_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[NoOp200Response6]: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response6", + } + 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 no_op_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: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response6", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _no_op_serialize( self, - user_code, _request_auth, _content_type, _headers, @@ -1127,8 +1339,6 @@ def _o_idc_service_get_device_authorization_request_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_code is not None: - _path_params['userCode'] = user_code # process the query parameters # process the header parameters # process the form parameters @@ -1151,7 +1361,7 @@ def _o_idc_service_get_device_authorization_request_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/oidc/device_authorization/{userCode}', + resource_path='/dc68286c', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/organization_service_api.py b/zitadel_client/api/organization_service_api.py index cbf423e9..48d2fd7f 100644 --- a/zitadel_client/api/organization_service_api.py +++ b/zitadel_client/api/organization_service_api.py @@ -16,6 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from zitadel_client.models.no_op200_response5 import NoOp200Response5 from zitadel_client.models.organization_service_add_organization_request import OrganizationServiceAddOrganizationRequest from zitadel_client.models.organization_service_add_organization_response import OrganizationServiceAddOrganizationResponse from zitadel_client.models.organization_service_list_organizations_request import OrganizationServiceListOrganizationsRequest @@ -40,7 +41,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def organization_service_add_organization( + def add_organization( self, organization_service_add_organization_request: OrganizationServiceAddOrganizationRequest, _request_timeout: Union[ @@ -56,9 +57,9 @@ def organization_service_add_organization( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> OrganizationServiceAddOrganizationResponse: - """Create an Organization + """AddOrganization - 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. + 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 @@ -84,7 +85,7 @@ def organization_service_add_organization( :return: Returns the result object. """ # noqa: E501 - _param = self._organization_service_add_organization_serialize( + _param = self._add_organization_serialize( organization_service_add_organization_request=organization_service_add_organization_request, _request_auth=_request_auth, _content_type=_content_type, @@ -94,8 +95,6 @@ def organization_service_add_organization( _response_types_map: Dict[str, Optional[str]] = { '200': "OrganizationServiceAddOrganizationResponse", - '403': "OrganizationServiceRpcStatus", - '404': "OrganizationServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -109,7 +108,7 @@ def organization_service_add_organization( @validate_call - def organization_service_add_organization_with_http_info( + def add_organization_with_http_info( self, organization_service_add_organization_request: OrganizationServiceAddOrganizationRequest, _request_timeout: Union[ @@ -125,9 +124,9 @@ def organization_service_add_organization_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[OrganizationServiceAddOrganizationResponse]: - """Create an Organization + """AddOrganization - 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. + 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 @@ -153,7 +152,7 @@ def organization_service_add_organization_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._organization_service_add_organization_serialize( + _param = self._add_organization_serialize( organization_service_add_organization_request=organization_service_add_organization_request, _request_auth=_request_auth, _content_type=_content_type, @@ -163,8 +162,6 @@ def organization_service_add_organization_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "OrganizationServiceAddOrganizationResponse", - '403': "OrganizationServiceRpcStatus", - '404': "OrganizationServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -178,7 +175,7 @@ def organization_service_add_organization_with_http_info( @validate_call - def organization_service_add_organization_without_preload_content( + def add_organization_without_preload_content( self, organization_service_add_organization_request: OrganizationServiceAddOrganizationRequest, _request_timeout: Union[ @@ -194,9 +191,9 @@ def organization_service_add_organization_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create an Organization + """AddOrganization - 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. + 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 @@ -222,7 +219,7 @@ def organization_service_add_organization_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._organization_service_add_organization_serialize( + _param = self._add_organization_serialize( organization_service_add_organization_request=organization_service_add_organization_request, _request_auth=_request_auth, _content_type=_content_type, @@ -232,8 +229,6 @@ def organization_service_add_organization_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "OrganizationServiceAddOrganizationResponse", - '403': "OrganizationServiceRpcStatus", - '404': "OrganizationServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -242,7 +237,7 @@ def organization_service_add_organization_without_preload_content( return response_data.response - def _organization_service_add_organization_serialize( + def _add_organization_serialize( self, organization_service_add_organization_request, _request_auth, @@ -303,7 +298,7 @@ def _organization_service_add_organization_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/organizations', + resource_path='/zitadel.org.v2.OrganizationService/AddOrganization', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -320,7 +315,7 @@ def _organization_service_add_organization_serialize( @validate_call - def organization_service_list_organizations( + def list_organizations( self, organization_service_list_organizations_request: OrganizationServiceListOrganizationsRequest, _request_timeout: Union[ @@ -336,9 +331,9 @@ def organization_service_list_organizations( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> OrganizationServiceListOrganizationsResponse: - """Search Organizations + """ListOrganizations - Search for Organizations. By default, we will return all organization of the instance. Make sure to include a limit and sorting for pagination.. + 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 @@ -364,7 +359,7 @@ def organization_service_list_organizations( :return: Returns the result object. """ # noqa: E501 - _param = self._organization_service_list_organizations_serialize( + _param = self._list_organizations_serialize( organization_service_list_organizations_request=organization_service_list_organizations_request, _request_auth=_request_auth, _content_type=_content_type, @@ -374,9 +369,6 @@ def organization_service_list_organizations( _response_types_map: Dict[str, Optional[str]] = { '200': "OrganizationServiceListOrganizationsResponse", - '400': "OrganizationServiceRpcStatus", - '403': "OrganizationServiceRpcStatus", - '404': "OrganizationServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -390,7 +382,7 @@ def organization_service_list_organizations( @validate_call - def organization_service_list_organizations_with_http_info( + def list_organizations_with_http_info( self, organization_service_list_organizations_request: OrganizationServiceListOrganizationsRequest, _request_timeout: Union[ @@ -406,9 +398,9 @@ def organization_service_list_organizations_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[OrganizationServiceListOrganizationsResponse]: - """Search Organizations + """ListOrganizations - Search for Organizations. By default, we will return all organization of the instance. Make sure to include a limit and sorting for pagination.. + 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 @@ -434,7 +426,7 @@ def organization_service_list_organizations_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._organization_service_list_organizations_serialize( + _param = self._list_organizations_serialize( organization_service_list_organizations_request=organization_service_list_organizations_request, _request_auth=_request_auth, _content_type=_content_type, @@ -444,9 +436,6 @@ def organization_service_list_organizations_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "OrganizationServiceListOrganizationsResponse", - '400': "OrganizationServiceRpcStatus", - '403': "OrganizationServiceRpcStatus", - '404': "OrganizationServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -460,7 +449,7 @@ def organization_service_list_organizations_with_http_info( @validate_call - def organization_service_list_organizations_without_preload_content( + def list_organizations_without_preload_content( self, organization_service_list_organizations_request: OrganizationServiceListOrganizationsRequest, _request_timeout: Union[ @@ -476,9 +465,9 @@ def organization_service_list_organizations_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Search Organizations + """ListOrganizations - Search for Organizations. By default, we will return all organization of the instance. Make sure to include a limit and sorting for pagination.. + 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 @@ -504,7 +493,7 @@ def organization_service_list_organizations_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._organization_service_list_organizations_serialize( + _param = self._list_organizations_serialize( organization_service_list_organizations_request=organization_service_list_organizations_request, _request_auth=_request_auth, _content_type=_content_type, @@ -514,9 +503,6 @@ def organization_service_list_organizations_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "OrganizationServiceListOrganizationsResponse", - '400': "OrganizationServiceRpcStatus", - '403': "OrganizationServiceRpcStatus", - '404': "OrganizationServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -525,7 +511,7 @@ def organization_service_list_organizations_without_preload_content( return response_data.response - def _organization_service_list_organizations_serialize( + def _list_organizations_serialize( self, organization_service_list_organizations_request, _request_auth, @@ -586,7 +572,250 @@ def _organization_service_list_organizations_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/organizations/_search', + resource_path='/zitadel.org.v2.OrganizationService/ListOrganizations', + 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 no_op( + 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, + ) -> NoOp200Response5: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response5", + } + 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 no_op_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[NoOp200Response5]: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response5", + } + 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 no_op_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: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response5", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _no_op_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='/30a7bb25', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/saml_service_api.py b/zitadel_client/api/saml_service_api.py index b0476a2c..93570383 100644 --- a/zitadel_client/api/saml_service_api.py +++ b/zitadel_client/api/saml_service_api.py @@ -16,10 +16,10 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr -from typing_extensions import Annotated +from zitadel_client.models.no_op200_response7 import NoOp200Response7 from zitadel_client.models.saml_service_create_response_request import SAMLServiceCreateResponseRequest from zitadel_client.models.saml_service_create_response_response import SAMLServiceCreateResponseResponse +from zitadel_client.models.saml_service_get_saml_request_request import SAMLServiceGetSAMLRequestRequest from zitadel_client.models.saml_service_get_saml_request_response import SAMLServiceGetSAMLRequestResponse from zitadel_client.api_client import ApiClient, RequestSerialized @@ -41,9 +41,8 @@ def __init__(self, api_client=None) -> None: @validate_call - def s_aml_service_create_response( + def create_response( self, - saml_request_id: Annotated[StrictStr, Field(description="ID of the SAML Request.")], saml_service_create_response_request: SAMLServiceCreateResponseRequest, _request_timeout: Union[ None, @@ -58,12 +57,9 @@ def s_aml_service_create_response( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SAMLServiceCreateResponseResponse: - """Finalize a SAML Request and get the response. + """CreateResponse - 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 @@ -88,8 +84,7 @@ def s_aml_service_create_response( :return: Returns the result object. """ # noqa: E501 - _param = self._s_aml_service_create_response_serialize( - saml_request_id=saml_request_id, + _param = self._create_response_serialize( saml_service_create_response_request=saml_service_create_response_request, _request_auth=_request_auth, _content_type=_content_type, @@ -99,8 +94,6 @@ def s_aml_service_create_response( _response_types_map: Dict[str, Optional[str]] = { '200': "SAMLServiceCreateResponseResponse", - '403': "SAMLServiceRpcStatus", - '404': "SAMLServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -114,9 +107,8 @@ def s_aml_service_create_response( @validate_call - def s_aml_service_create_response_with_http_info( + def 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, @@ -131,12 +123,9 @@ def s_aml_service_create_response_with_http_info( _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. + """CreateResponse - 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 @@ -161,8 +150,7 @@ def s_aml_service_create_response_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._s_aml_service_create_response_serialize( - saml_request_id=saml_request_id, + _param = self._create_response_serialize( saml_service_create_response_request=saml_service_create_response_request, _request_auth=_request_auth, _content_type=_content_type, @@ -172,8 +160,6 @@ def s_aml_service_create_response_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SAMLServiceCreateResponseResponse", - '403': "SAMLServiceRpcStatus", - '404': "SAMLServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -187,9 +173,8 @@ def s_aml_service_create_response_with_http_info( @validate_call - def s_aml_service_create_response_without_preload_content( + def 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, @@ -204,12 +189,9 @@ def s_aml_service_create_response_without_preload_content( _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. + """CreateResponse - 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 @@ -234,8 +216,7 @@ def s_aml_service_create_response_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._s_aml_service_create_response_serialize( - saml_request_id=saml_request_id, + _param = self._create_response_serialize( saml_service_create_response_request=saml_service_create_response_request, _request_auth=_request_auth, _content_type=_content_type, @@ -245,8 +226,6 @@ def s_aml_service_create_response_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SAMLServiceCreateResponseResponse", - '403': "SAMLServiceRpcStatus", - '404': "SAMLServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -255,9 +234,8 @@ def s_aml_service_create_response_without_preload_content( return response_data.response - def _s_aml_service_create_response_serialize( + def _create_response_serialize( self, - saml_request_id, saml_service_create_response_request, _request_auth, _content_type, @@ -280,8 +258,6 @@ def _s_aml_service_create_response_serialize( _body_params: Optional[bytes] = None # process the path parameters - if saml_request_id is not None: - _path_params['samlRequestId'] = saml_request_id # process the query parameters # process the header parameters # process the form parameters @@ -319,7 +295,7 @@ def _s_aml_service_create_response_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/saml/saml_requests/{samlRequestId}', + resource_path='/zitadel.saml.v2.SAMLService/CreateResponse', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -336,9 +312,9 @@ def _s_aml_service_create_response_serialize( @validate_call - def s_aml_service_get_saml_request( + def get_saml_request( self, - saml_request_id: Annotated[StrictStr, Field(description="ID of the SAML Request, as obtained from the redirect URL.")], + saml_service_get_saml_request_request: SAMLServiceGetSAMLRequestRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -352,12 +328,11 @@ def s_aml_service_get_saml_request( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SAMLServiceGetSAMLRequestResponse: - """Get SAML Request details + """GetSAMLRequest - 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 saml_service_get_saml_request_request: (required) + :type saml_service_get_saml_request_request: SAMLServiceGetSAMLRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -380,8 +355,8 @@ def s_aml_service_get_saml_request( :return: Returns the result object. """ # noqa: E501 - _param = self._s_aml_service_get_saml_request_serialize( - saml_request_id=saml_request_id, + _param = self._get_saml_request_serialize( + saml_service_get_saml_request_request=saml_service_get_saml_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -390,8 +365,6 @@ def s_aml_service_get_saml_request( _response_types_map: Dict[str, Optional[str]] = { '200': "SAMLServiceGetSAMLRequestResponse", - '403': "SAMLServiceRpcStatus", - '404': "SAMLServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -405,9 +378,9 @@ def s_aml_service_get_saml_request( @validate_call - def s_aml_service_get_saml_request_with_http_info( + def 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.")], + saml_service_get_saml_request_request: SAMLServiceGetSAMLRequestRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -421,12 +394,11 @@ def s_aml_service_get_saml_request_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SAMLServiceGetSAMLRequestResponse]: - """Get SAML Request details + """GetSAMLRequest - 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 saml_service_get_saml_request_request: (required) + :type saml_service_get_saml_request_request: SAMLServiceGetSAMLRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -449,8 +421,8 @@ def s_aml_service_get_saml_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._s_aml_service_get_saml_request_serialize( - saml_request_id=saml_request_id, + _param = self._get_saml_request_serialize( + saml_service_get_saml_request_request=saml_service_get_saml_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -459,8 +431,6 @@ def s_aml_service_get_saml_request_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SAMLServiceGetSAMLRequestResponse", - '403': "SAMLServiceRpcStatus", - '404': "SAMLServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -474,9 +444,9 @@ def s_aml_service_get_saml_request_with_http_info( @validate_call - def s_aml_service_get_saml_request_without_preload_content( + def 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.")], + saml_service_get_saml_request_request: SAMLServiceGetSAMLRequestRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -490,12 +460,11 @@ def s_aml_service_get_saml_request_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get SAML Request details + """GetSAMLRequest - 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 saml_service_get_saml_request_request: (required) + :type saml_service_get_saml_request_request: SAMLServiceGetSAMLRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -518,8 +487,8 @@ def s_aml_service_get_saml_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._s_aml_service_get_saml_request_serialize( - saml_request_id=saml_request_id, + _param = self._get_saml_request_serialize( + saml_service_get_saml_request_request=saml_service_get_saml_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -528,8 +497,6 @@ def s_aml_service_get_saml_request_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SAMLServiceGetSAMLRequestResponse", - '403': "SAMLServiceRpcStatus", - '404': "SAMLServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -538,9 +505,267 @@ def s_aml_service_get_saml_request_without_preload_content( return response_data.response - def _s_aml_service_get_saml_request_serialize( + def _get_saml_request_serialize( + self, + saml_service_get_saml_request_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 saml_service_get_saml_request_request is not None: + _body_params = saml_service_get_saml_request_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.saml.v2.SAMLService/GetSAMLRequest', + 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 no_op( + 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, + ) -> NoOp200Response7: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response7", + } + 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 no_op_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[NoOp200Response7]: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response7", + } + 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 no_op_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: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response7", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _no_op_serialize( self, - saml_request_id, _request_auth, _content_type, _headers, @@ -562,8 +787,6 @@ def _s_aml_service_get_saml_request_serialize( _body_params: Optional[bytes] = None # process the path parameters - if saml_request_id is not None: - _path_params['samlRequestId'] = saml_request_id # process the query parameters # process the header parameters # process the form parameters @@ -586,7 +809,7 @@ def _s_aml_service_get_saml_request_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/saml/saml_requests/{samlRequestId}', + resource_path='/d3bdecb1', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/session_service_api.py b/zitadel_client/api/session_service_api.py index f7de7684..9824e48b 100644 --- a/zitadel_client/api/session_service_api.py +++ b/zitadel_client/api/session_service_api.py @@ -16,13 +16,12 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr -from typing import Optional -from typing_extensions import Annotated +from zitadel_client.models.no_op200_response2 import NoOp200Response2 from zitadel_client.models.session_service_create_session_request import SessionServiceCreateSessionRequest from zitadel_client.models.session_service_create_session_response import SessionServiceCreateSessionResponse from zitadel_client.models.session_service_delete_session_request import SessionServiceDeleteSessionRequest from zitadel_client.models.session_service_delete_session_response import SessionServiceDeleteSessionResponse +from zitadel_client.models.session_service_get_session_request import SessionServiceGetSessionRequest from zitadel_client.models.session_service_get_session_response import SessionServiceGetSessionResponse from zitadel_client.models.session_service_list_sessions_request import SessionServiceListSessionsRequest from zitadel_client.models.session_service_list_sessions_response import SessionServiceListSessionsResponse @@ -48,7 +47,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def session_service_create_session( + def create_session( self, session_service_create_session_request: SessionServiceCreateSessionRequest, _request_timeout: Union[ @@ -64,9 +63,9 @@ def session_service_create_session( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SessionServiceCreateSessionResponse: - """Create a new session + """CreateSession - Create a new session. A token will be returned, which is required for further updates of the session. + Create a new session :param session_service_create_session_request: (required) :type session_service_create_session_request: SessionServiceCreateSessionRequest @@ -92,7 +91,7 @@ def session_service_create_session( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_create_session_serialize( + _param = self._create_session_serialize( session_service_create_session_request=session_service_create_session_request, _request_auth=_request_auth, _content_type=_content_type, @@ -101,9 +100,7 @@ def session_service_create_session( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SessionServiceCreateSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", + '200': "SessionServiceCreateSessionResponse", } response_data = self.api_client.call_api( *_param, @@ -117,7 +114,7 @@ def session_service_create_session( @validate_call - def session_service_create_session_with_http_info( + def create_session_with_http_info( self, session_service_create_session_request: SessionServiceCreateSessionRequest, _request_timeout: Union[ @@ -133,9 +130,9 @@ def session_service_create_session_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SessionServiceCreateSessionResponse]: - """Create a new session + """CreateSession - Create a new session. A token will be returned, which is required for further updates of the session. + Create a new session :param session_service_create_session_request: (required) :type session_service_create_session_request: SessionServiceCreateSessionRequest @@ -161,7 +158,7 @@ def session_service_create_session_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_create_session_serialize( + _param = self._create_session_serialize( session_service_create_session_request=session_service_create_session_request, _request_auth=_request_auth, _content_type=_content_type, @@ -170,9 +167,7 @@ def session_service_create_session_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SessionServiceCreateSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", + '200': "SessionServiceCreateSessionResponse", } response_data = self.api_client.call_api( *_param, @@ -186,7 +181,7 @@ def session_service_create_session_with_http_info( @validate_call - def session_service_create_session_without_preload_content( + def create_session_without_preload_content( self, session_service_create_session_request: SessionServiceCreateSessionRequest, _request_timeout: Union[ @@ -202,9 +197,9 @@ def session_service_create_session_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create a new session + """CreateSession - Create a new session. A token will be returned, which is required for further updates of the session. + Create a new session :param session_service_create_session_request: (required) :type session_service_create_session_request: SessionServiceCreateSessionRequest @@ -230,7 +225,7 @@ def session_service_create_session_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_create_session_serialize( + _param = self._create_session_serialize( session_service_create_session_request=session_service_create_session_request, _request_auth=_request_auth, _content_type=_content_type, @@ -239,9 +234,7 @@ def session_service_create_session_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SessionServiceCreateSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", + '200': "SessionServiceCreateSessionResponse", } response_data = self.api_client.call_api( *_param, @@ -250,7 +243,7 @@ def session_service_create_session_without_preload_content( return response_data.response - def _session_service_create_session_serialize( + def _create_session_serialize( self, session_service_create_session_request, _request_auth, @@ -311,7 +304,7 @@ def _session_service_create_session_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/sessions', + resource_path='/zitadel.session.v2.SessionService/CreateSession', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -328,9 +321,8 @@ def _session_service_create_session_serialize( @validate_call - def session_service_delete_session( + def 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, @@ -345,12 +337,10 @@ def session_service_delete_session( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SessionServiceDeleteSessionResponse: - """Terminate an existing session + """DeleteSession - Terminate your own session or if granted any other session. + Terminate a 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 @@ -375,8 +365,7 @@ def session_service_delete_session( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_delete_session_serialize( - session_id=session_id, + _param = self._delete_session_serialize( session_service_delete_session_request=session_service_delete_session_request, _request_auth=_request_auth, _content_type=_content_type, @@ -386,8 +375,6 @@ def session_service_delete_session( _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceDeleteSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -401,9 +388,8 @@ def session_service_delete_session( @validate_call - def session_service_delete_session_with_http_info( + def 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, @@ -418,12 +404,10 @@ def session_service_delete_session_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SessionServiceDeleteSessionResponse]: - """Terminate an existing session + """DeleteSession - Terminate your own session or if granted any other session. + Terminate a 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 @@ -448,8 +432,7 @@ def session_service_delete_session_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_delete_session_serialize( - session_id=session_id, + _param = self._delete_session_serialize( session_service_delete_session_request=session_service_delete_session_request, _request_auth=_request_auth, _content_type=_content_type, @@ -459,8 +442,6 @@ def session_service_delete_session_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceDeleteSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -474,9 +455,8 @@ def session_service_delete_session_with_http_info( @validate_call - def session_service_delete_session_without_preload_content( + def 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, @@ -491,12 +471,10 @@ def session_service_delete_session_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Terminate an existing session + """DeleteSession - Terminate your own session or if granted any other session. + Terminate a 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 @@ -521,8 +499,7 @@ def session_service_delete_session_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_delete_session_serialize( - session_id=session_id, + _param = self._delete_session_serialize( session_service_delete_session_request=session_service_delete_session_request, _request_auth=_request_auth, _content_type=_content_type, @@ -532,8 +509,6 @@ def session_service_delete_session_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceDeleteSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -542,9 +517,8 @@ def session_service_delete_session_without_preload_content( return response_data.response - def _session_service_delete_session_serialize( + def _delete_session_serialize( self, - session_id, session_service_delete_session_request, _request_auth, _content_type, @@ -567,8 +541,6 @@ def _session_service_delete_session_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 @@ -605,8 +577,8 @@ def _session_service_delete_session_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/sessions/{sessionId}', + method='POST', + resource_path='/zitadel.session.v2.SessionService/DeleteSession', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -623,10 +595,9 @@ def _session_service_delete_session_serialize( @validate_call - def session_service_get_session( + def get_session( self, - session_id: StrictStr, - session_token: Optional[StrictStr] = None, + session_service_get_session_request: SessionServiceGetSessionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -640,14 +611,12 @@ def session_service_get_session( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SessionServiceGetSessionResponse: - """Get a session + """GetSession - Get a session and all its information like the time of the user or password verification + GetSession a session - :param session_id: (required) - :type session_id: str - :param session_token: - :type session_token: str + :param session_service_get_session_request: (required) + :type session_service_get_session_request: SessionServiceGetSessionRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -670,9 +639,8 @@ def session_service_get_session( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_get_session_serialize( - session_id=session_id, - session_token=session_token, + _param = self._get_session_serialize( + session_service_get_session_request=session_service_get_session_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -681,8 +649,6 @@ def session_service_get_session( _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceGetSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -696,10 +662,9 @@ def session_service_get_session( @validate_call - def session_service_get_session_with_http_info( + def get_session_with_http_info( self, - session_id: StrictStr, - session_token: Optional[StrictStr] = None, + session_service_get_session_request: SessionServiceGetSessionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -713,14 +678,12 @@ def session_service_get_session_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SessionServiceGetSessionResponse]: - """Get a session + """GetSession - Get a session and all its information like the time of the user or password verification + GetSession a session - :param session_id: (required) - :type session_id: str - :param session_token: - :type session_token: str + :param session_service_get_session_request: (required) + :type session_service_get_session_request: SessionServiceGetSessionRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -743,9 +706,8 @@ def session_service_get_session_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_get_session_serialize( - session_id=session_id, - session_token=session_token, + _param = self._get_session_serialize( + session_service_get_session_request=session_service_get_session_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -754,8 +716,6 @@ def session_service_get_session_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceGetSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -769,10 +729,9 @@ def session_service_get_session_with_http_info( @validate_call - def session_service_get_session_without_preload_content( + def get_session_without_preload_content( self, - session_id: StrictStr, - session_token: Optional[StrictStr] = None, + session_service_get_session_request: SessionServiceGetSessionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -786,14 +745,12 @@ def session_service_get_session_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get a session + """GetSession - Get a session and all its information like the time of the user or password verification + GetSession a session - :param session_id: (required) - :type session_id: str - :param session_token: - :type session_token: str + :param session_service_get_session_request: (required) + :type session_service_get_session_request: SessionServiceGetSessionRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -816,9 +773,8 @@ def session_service_get_session_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_get_session_serialize( - session_id=session_id, - session_token=session_token, + _param = self._get_session_serialize( + session_service_get_session_request=session_service_get_session_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -827,8 +783,6 @@ def session_service_get_session_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceGetSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -837,10 +791,9 @@ def session_service_get_session_without_preload_content( return response_data.response - def _session_service_get_session_serialize( + def _get_session_serialize( self, - session_id, - session_token, + session_service_get_session_request, _request_auth, _content_type, _headers, @@ -862,16 +815,12 @@ def _session_service_get_session_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 - if session_token is not None: - - _query_params.append(('sessionToken', session_token)) - # process the header parameters # process the form parameters # process the body parameter + if session_service_get_session_request is not None: + _body_params = session_service_get_session_request # set the HTTP header `Accept` @@ -882,6 +831,19 @@ def _session_service_get_session_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] = [ @@ -889,8 +851,8 @@ def _session_service_get_session_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/sessions/{sessionId}', + method='POST', + resource_path='/zitadel.session.v2.SessionService/GetSession', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -907,7 +869,7 @@ def _session_service_get_session_serialize( @validate_call - def session_service_list_sessions( + def list_sessions( self, session_service_list_sessions_request: SessionServiceListSessionsRequest, _request_timeout: Union[ @@ -923,9 +885,9 @@ def session_service_list_sessions( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SessionServiceListSessionsResponse: - """Search sessions + """ListSessions - Search for sessions + Search sessions :param session_service_list_sessions_request: (required) :type session_service_list_sessions_request: SessionServiceListSessionsRequest @@ -951,7 +913,7 @@ def session_service_list_sessions( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_list_sessions_serialize( + _param = self._list_sessions_serialize( session_service_list_sessions_request=session_service_list_sessions_request, _request_auth=_request_auth, _content_type=_content_type, @@ -961,9 +923,6 @@ def session_service_list_sessions( _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceListSessionsResponse", - '400': "SessionServiceRpcStatus", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -977,7 +936,7 @@ def session_service_list_sessions( @validate_call - def session_service_list_sessions_with_http_info( + def list_sessions_with_http_info( self, session_service_list_sessions_request: SessionServiceListSessionsRequest, _request_timeout: Union[ @@ -993,9 +952,9 @@ def session_service_list_sessions_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SessionServiceListSessionsResponse]: - """Search sessions + """ListSessions - Search for sessions + Search sessions :param session_service_list_sessions_request: (required) :type session_service_list_sessions_request: SessionServiceListSessionsRequest @@ -1021,7 +980,7 @@ def session_service_list_sessions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_list_sessions_serialize( + _param = self._list_sessions_serialize( session_service_list_sessions_request=session_service_list_sessions_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1031,9 +990,6 @@ def session_service_list_sessions_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceListSessionsResponse", - '400': "SessionServiceRpcStatus", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1047,7 +1003,7 @@ def session_service_list_sessions_with_http_info( @validate_call - def session_service_list_sessions_without_preload_content( + def list_sessions_without_preload_content( self, session_service_list_sessions_request: SessionServiceListSessionsRequest, _request_timeout: Union[ @@ -1063,9 +1019,9 @@ def session_service_list_sessions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Search sessions + """ListSessions - Search for sessions + Search sessions :param session_service_list_sessions_request: (required) :type session_service_list_sessions_request: SessionServiceListSessionsRequest @@ -1091,7 +1047,7 @@ def session_service_list_sessions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_list_sessions_serialize( + _param = self._list_sessions_serialize( session_service_list_sessions_request=session_service_list_sessions_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1101,9 +1057,6 @@ def session_service_list_sessions_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceListSessionsResponse", - '400': "SessionServiceRpcStatus", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1112,7 +1065,7 @@ def session_service_list_sessions_without_preload_content( return response_data.response - def _session_service_list_sessions_serialize( + def _list_sessions_serialize( self, session_service_list_sessions_request, _request_auth, @@ -1173,7 +1126,7 @@ def _session_service_list_sessions_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/sessions/search', + resource_path='/zitadel.session.v2.SessionService/ListSessions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1190,9 +1143,251 @@ def _session_service_list_sessions_serialize( @validate_call - def session_service_set_session( + def no_op( + 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, + ) -> NoOp200Response2: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response2", + } + 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 no_op_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[NoOp200Response2]: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response2", + } + 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 no_op_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: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response2", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _no_op_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='/44ad5538', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_session( self, - session_id: Annotated[StrictStr, Field(description="\"id of the session to update\"")], session_service_set_session_request: SessionServiceSetSessionRequest, _request_timeout: Union[ None, @@ -1207,12 +1402,10 @@ def session_service_set_session( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SessionServiceSetSessionResponse: - """Update an existing session + """SetSession - Update an existing session with new information. + Update a session - :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 _request_timeout: timeout setting for this request. If one @@ -1237,8 +1430,7 @@ def session_service_set_session( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_set_session_serialize( - session_id=session_id, + _param = self._set_session_serialize( session_service_set_session_request=session_service_set_session_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1248,8 +1440,6 @@ def session_service_set_session( _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceSetSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1263,9 +1453,8 @@ def session_service_set_session( @validate_call - def session_service_set_session_with_http_info( + def set_session_with_http_info( self, - session_id: Annotated[StrictStr, Field(description="\"id of the session to update\"")], session_service_set_session_request: SessionServiceSetSessionRequest, _request_timeout: Union[ None, @@ -1280,12 +1469,10 @@ def session_service_set_session_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SessionServiceSetSessionResponse]: - """Update an existing session + """SetSession - Update an existing session with new information. + Update a session - :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 _request_timeout: timeout setting for this request. If one @@ -1310,8 +1497,7 @@ 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, + _param = self._set_session_serialize( session_service_set_session_request=session_service_set_session_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1321,8 +1507,6 @@ def session_service_set_session_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceSetSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1336,9 +1520,8 @@ def session_service_set_session_with_http_info( @validate_call - def session_service_set_session_without_preload_content( + def set_session_without_preload_content( self, - session_id: Annotated[StrictStr, Field(description="\"id of the session to update\"")], session_service_set_session_request: SessionServiceSetSessionRequest, _request_timeout: Union[ None, @@ -1353,12 +1536,10 @@ def session_service_set_session_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update an existing session + """SetSession - Update an existing session with new information. + Update a session - :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 _request_timeout: timeout setting for this request. If one @@ -1383,8 +1564,7 @@ def session_service_set_session_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_set_session_serialize( - session_id=session_id, + _param = self._set_session_serialize( session_service_set_session_request=session_service_set_session_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1394,8 +1574,6 @@ def session_service_set_session_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceSetSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1404,9 +1582,8 @@ def session_service_set_session_without_preload_content( return response_data.response - def _session_service_set_session_serialize( + def _set_session_serialize( self, - session_id, session_service_set_session_request, _request_auth, _content_type, @@ -1429,8 +1606,6 @@ def _session_service_set_session_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 @@ -1467,8 +1642,8 @@ def _session_service_set_session_serialize( ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/v2/sessions/{sessionId}', + method='POST', + resource_path='/zitadel.session.v2.SessionService/SetSession', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/settings_service_api.py b/zitadel_client/api/settings_service_api.py index 2a59f07a..ef932257 100644 --- a/zitadel_client/api/settings_service_api.py +++ b/zitadel_client/api/settings_service_api.py @@ -16,16 +16,23 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictBool, StrictStr -from typing import Optional +from typing import Any, Dict +from zitadel_client.models.settings_service_get_active_identity_providers_request import SettingsServiceGetActiveIdentityProvidersRequest from zitadel_client.models.settings_service_get_active_identity_providers_response import SettingsServiceGetActiveIdentityProvidersResponse +from zitadel_client.models.settings_service_get_branding_settings_request import SettingsServiceGetBrandingSettingsRequest from zitadel_client.models.settings_service_get_branding_settings_response import SettingsServiceGetBrandingSettingsResponse +from zitadel_client.models.settings_service_get_domain_settings_request import SettingsServiceGetDomainSettingsRequest from zitadel_client.models.settings_service_get_domain_settings_response import SettingsServiceGetDomainSettingsResponse from zitadel_client.models.settings_service_get_general_settings_response import SettingsServiceGetGeneralSettingsResponse +from zitadel_client.models.settings_service_get_legal_and_support_settings_request import SettingsServiceGetLegalAndSupportSettingsRequest from zitadel_client.models.settings_service_get_legal_and_support_settings_response import SettingsServiceGetLegalAndSupportSettingsResponse +from zitadel_client.models.settings_service_get_lockout_settings_request import SettingsServiceGetLockoutSettingsRequest from zitadel_client.models.settings_service_get_lockout_settings_response import SettingsServiceGetLockoutSettingsResponse +from zitadel_client.models.settings_service_get_login_settings_request import SettingsServiceGetLoginSettingsRequest from zitadel_client.models.settings_service_get_login_settings_response import SettingsServiceGetLoginSettingsResponse +from zitadel_client.models.settings_service_get_password_complexity_settings_request import SettingsServiceGetPasswordComplexitySettingsRequest from zitadel_client.models.settings_service_get_password_complexity_settings_response import SettingsServiceGetPasswordComplexitySettingsResponse +from zitadel_client.models.settings_service_get_password_expiry_settings_request import SettingsServiceGetPasswordExpirySettingsRequest from zitadel_client.models.settings_service_get_password_expiry_settings_response import SettingsServiceGetPasswordExpirySettingsResponse from zitadel_client.models.settings_service_get_security_settings_response import SettingsServiceGetSecuritySettingsResponse from zitadel_client.models.settings_service_set_security_settings_request import SettingsServiceSetSecuritySettingsRequest @@ -50,14 +57,9 @@ def __init__(self, api_client=None) -> None: @validate_call - def settings_service_get_active_identity_providers( + def get_active_identity_providers( 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, + settings_service_get_active_identity_providers_request: SettingsServiceGetActiveIdentityProvidersRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -71,22 +73,12 @@ def settings_service_get_active_identity_providers( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetActiveIdentityProvidersResponse: - """Get the current active identity providers - - Return the current active identity providers 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 + """GetActiveIdentityProviders + + Get the current active identity providers + + :param settings_service_get_active_identity_providers_request: (required) + :type settings_service_get_active_identity_providers_request: SettingsServiceGetActiveIdentityProvidersRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -109,13 +101,8 @@ def settings_service_get_active_identity_providers( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_active_identity_providers_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, + _param = self._get_active_identity_providers_serialize( + settings_service_get_active_identity_providers_request=settings_service_get_active_identity_providers_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -124,8 +111,6 @@ def settings_service_get_active_identity_providers( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetActiveIdentityProvidersResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -139,14 +124,9 @@ def settings_service_get_active_identity_providers( @validate_call - def settings_service_get_active_identity_providers_with_http_info( + def get_active_identity_providers_with_http_info( 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, + settings_service_get_active_identity_providers_request: SettingsServiceGetActiveIdentityProvidersRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -160,22 +140,12 @@ def settings_service_get_active_identity_providers_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SettingsServiceGetActiveIdentityProvidersResponse]: - """Get the current active identity providers - - Return the current active identity providers 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 + """GetActiveIdentityProviders + + Get the current active identity providers + + :param settings_service_get_active_identity_providers_request: (required) + :type settings_service_get_active_identity_providers_request: SettingsServiceGetActiveIdentityProvidersRequest :param _request_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 +168,8 @@ 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( - 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, + _param = self._get_active_identity_providers_serialize( + settings_service_get_active_identity_providers_request=settings_service_get_active_identity_providers_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -213,8 +178,6 @@ def settings_service_get_active_identity_providers_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetActiveIdentityProvidersResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -228,14 +191,9 @@ def settings_service_get_active_identity_providers_with_http_info( @validate_call - def settings_service_get_active_identity_providers_without_preload_content( + def get_active_identity_providers_without_preload_content( 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, + settings_service_get_active_identity_providers_request: SettingsServiceGetActiveIdentityProvidersRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -249,22 +207,12 @@ def settings_service_get_active_identity_providers_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the current active identity providers - - Return the current active identity providers 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 + """GetActiveIdentityProviders + + Get the current active identity providers + + :param settings_service_get_active_identity_providers_request: (required) + :type settings_service_get_active_identity_providers_request: SettingsServiceGetActiveIdentityProvidersRequest :param _request_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 +235,8 @@ 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( - 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, + _param = self._get_active_identity_providers_serialize( + settings_service_get_active_identity_providers_request=settings_service_get_active_identity_providers_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -302,8 +245,6 @@ def settings_service_get_active_identity_providers_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetActiveIdentityProvidersResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -312,14 +253,9 @@ def settings_service_get_active_identity_providers_without_preload_content( return response_data.response - def _settings_service_get_active_identity_providers_serialize( + def _get_active_identity_providers_serialize( self, - ctx_org_id, - ctx_instance, - creation_allowed, - linking_allowed, - auto_creation, - auto_linking, + settings_service_get_active_identity_providers_request, _request_auth, _content_type, _headers, @@ -342,33 +278,11 @@ def _settings_service_get_active_identity_providers_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)) - - 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 + if settings_service_get_active_identity_providers_request is not None: + _body_params = settings_service_get_active_identity_providers_request # set the HTTP header `Accept` @@ -379,6 +293,19 @@ def _settings_service_get_active_identity_providers_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] = [ @@ -386,8 +313,8 @@ def _settings_service_get_active_identity_providers_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/login/idps', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetActiveIdentityProviders', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -404,10 +331,9 @@ def _settings_service_get_active_identity_providers_serialize( @validate_call - def settings_service_get_branding_settings( + def get_branding_settings( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_branding_settings_request: SettingsServiceGetBrandingSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -421,14 +347,12 @@ def settings_service_get_branding_settings( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetBrandingSettingsResponse: - """Get the current active branding settings + """GetBrandingSettings - Return the current active branding settings for the requested context + Get the current active branding settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_branding_settings_request: (required) + :type settings_service_get_branding_settings_request: SettingsServiceGetBrandingSettingsRequest :param _request_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 +375,8 @@ 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._get_branding_settings_serialize( + settings_service_get_branding_settings_request=settings_service_get_branding_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -462,8 +385,6 @@ def settings_service_get_branding_settings( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetBrandingSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -477,10 +398,9 @@ def settings_service_get_branding_settings( @validate_call - def settings_service_get_branding_settings_with_http_info( + def get_branding_settings_with_http_info( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_branding_settings_request: SettingsServiceGetBrandingSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -494,14 +414,12 @@ def settings_service_get_branding_settings_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SettingsServiceGetBrandingSettingsResponse]: - """Get the current active branding settings + """GetBrandingSettings - Return the current active branding settings for the requested context + Get the current active branding settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_branding_settings_request: (required) + :type settings_service_get_branding_settings_request: SettingsServiceGetBrandingSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -524,9 +442,8 @@ def settings_service_get_branding_settings_with_http_info( :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._get_branding_settings_serialize( + settings_service_get_branding_settings_request=settings_service_get_branding_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -535,8 +452,6 @@ def settings_service_get_branding_settings_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetBrandingSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -550,10 +465,9 @@ def settings_service_get_branding_settings_with_http_info( @validate_call - def settings_service_get_branding_settings_without_preload_content( + def get_branding_settings_without_preload_content( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_branding_settings_request: SettingsServiceGetBrandingSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -567,14 +481,12 @@ def settings_service_get_branding_settings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the current active branding settings + """GetBrandingSettings - Return the current active branding settings for the requested context + Get the current active branding settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_branding_settings_request: (required) + :type settings_service_get_branding_settings_request: SettingsServiceGetBrandingSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -597,9 +509,8 @@ def settings_service_get_branding_settings_without_preload_content( :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._get_branding_settings_serialize( + settings_service_get_branding_settings_request=settings_service_get_branding_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -608,8 +519,6 @@ def settings_service_get_branding_settings_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetBrandingSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -618,10 +527,9 @@ def settings_service_get_branding_settings_without_preload_content( return response_data.response - def _settings_service_get_branding_settings_serialize( + def _get_branding_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_branding_settings_request, _request_auth, _content_type, _headers, @@ -644,17 +552,11 @@ def _settings_service_get_branding_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 + if settings_service_get_branding_settings_request is not None: + _body_params = settings_service_get_branding_settings_request # set the HTTP header `Accept` @@ -665,6 +567,19 @@ def _settings_service_get_branding_settings_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] = [ @@ -672,8 +587,8 @@ def _settings_service_get_branding_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/branding', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetBrandingSettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -690,10 +605,9 @@ def _settings_service_get_branding_settings_serialize( @validate_call - def settings_service_get_domain_settings( + def get_domain_settings( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_domain_settings_request: SettingsServiceGetDomainSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -707,14 +621,12 @@ def settings_service_get_domain_settings( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetDomainSettingsResponse: - """Get the domain settings + """GetDomainSettings - Return the domain settings for the requested context + Get the domain settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_domain_settings_request: (required) + :type settings_service_get_domain_settings_request: SettingsServiceGetDomainSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -737,9 +649,8 @@ def settings_service_get_domain_settings( :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, + _param = self._get_domain_settings_serialize( + settings_service_get_domain_settings_request=settings_service_get_domain_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -748,8 +659,6 @@ def settings_service_get_domain_settings( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetDomainSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -763,10 +672,9 @@ def settings_service_get_domain_settings( @validate_call - def settings_service_get_domain_settings_with_http_info( + def get_domain_settings_with_http_info( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_domain_settings_request: SettingsServiceGetDomainSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -780,14 +688,12 @@ def settings_service_get_domain_settings_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SettingsServiceGetDomainSettingsResponse]: - """Get the domain settings + """GetDomainSettings - Return the domain settings for the requested context + Get the domain settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_domain_settings_request: (required) + :type settings_service_get_domain_settings_request: SettingsServiceGetDomainSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -810,9 +716,8 @@ def settings_service_get_domain_settings_with_http_info( :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, + _param = self._get_domain_settings_serialize( + settings_service_get_domain_settings_request=settings_service_get_domain_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -821,8 +726,6 @@ def settings_service_get_domain_settings_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetDomainSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -836,10 +739,9 @@ def settings_service_get_domain_settings_with_http_info( @validate_call - def settings_service_get_domain_settings_without_preload_content( + def get_domain_settings_without_preload_content( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_domain_settings_request: SettingsServiceGetDomainSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -853,14 +755,12 @@ def settings_service_get_domain_settings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the domain settings + """GetDomainSettings - Return the domain settings for the requested context + Get the domain settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_domain_settings_request: (required) + :type settings_service_get_domain_settings_request: SettingsServiceGetDomainSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -883,9 +783,8 @@ def settings_service_get_domain_settings_without_preload_content( :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, + _param = self._get_domain_settings_serialize( + settings_service_get_domain_settings_request=settings_service_get_domain_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -894,8 +793,6 @@ def settings_service_get_domain_settings_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetDomainSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -904,10 +801,9 @@ def settings_service_get_domain_settings_without_preload_content( return response_data.response - def _settings_service_get_domain_settings_serialize( + def _get_domain_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_domain_settings_request, _request_auth, _content_type, _headers, @@ -930,17 +826,11 @@ def _settings_service_get_domain_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 + if settings_service_get_domain_settings_request is not None: + _body_params = settings_service_get_domain_settings_request # set the HTTP header `Accept` @@ -951,6 +841,19 @@ def _settings_service_get_domain_settings_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] = [ @@ -958,8 +861,8 @@ def _settings_service_get_domain_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/domain', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetDomainSettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -976,8 +879,9 @@ def _settings_service_get_domain_settings_serialize( @validate_call - def settings_service_get_general_settings( + def get_general_settings( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -991,10 +895,12 @@ def settings_service_get_general_settings( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetGeneralSettingsResponse: - """Get basic information over the instance + """GetGeneralSettings - Return the basic information of the instance for the requested context + Get basic information over the instance + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1017,7 +923,8 @@ def settings_service_get_general_settings( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_general_settings_serialize( + _param = self._get_general_settings_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1026,8 +933,6 @@ def settings_service_get_general_settings( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetGeneralSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1041,8 +946,9 @@ def settings_service_get_general_settings( @validate_call - def settings_service_get_general_settings_with_http_info( + def get_general_settings_with_http_info( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1056,10 +962,12 @@ def settings_service_get_general_settings_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SettingsServiceGetGeneralSettingsResponse]: - """Get basic information over the instance + """GetGeneralSettings - Return the basic information of the instance for the requested context + Get basic information over the instance + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1082,7 +990,8 @@ def settings_service_get_general_settings_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_general_settings_serialize( + _param = self._get_general_settings_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1091,8 +1000,6 @@ def settings_service_get_general_settings_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetGeneralSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1106,8 +1013,9 @@ def settings_service_get_general_settings_with_http_info( @validate_call - def settings_service_get_general_settings_without_preload_content( + def get_general_settings_without_preload_content( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1121,10 +1029,12 @@ def settings_service_get_general_settings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get basic information over the instance + """GetGeneralSettings - Return the basic information of the instance for the requested context + Get basic information over the instance + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1147,7 +1057,8 @@ def settings_service_get_general_settings_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_general_settings_serialize( + _param = self._get_general_settings_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1156,8 +1067,6 @@ def settings_service_get_general_settings_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetGeneralSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1166,8 +1075,9 @@ def settings_service_get_general_settings_without_preload_content( return response_data.response - def _settings_service_get_general_settings_serialize( + def _get_general_settings_serialize( self, + body, _request_auth, _content_type, _headers, @@ -1193,6 +1103,8 @@ def _settings_service_get_general_settings_serialize( # process the header parameters # process the form parameters # process the body parameter + if body is not None: + _body_params = body # set the HTTP header `Accept` @@ -1203,6 +1115,19 @@ def _settings_service_get_general_settings_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] = [ @@ -1210,8 +1135,8 @@ def _settings_service_get_general_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetGeneralSettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1228,10 +1153,9 @@ def _settings_service_get_general_settings_serialize( @validate_call - def settings_service_get_legal_and_support_settings( + def get_legal_and_support_settings( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_legal_and_support_settings_request: SettingsServiceGetLegalAndSupportSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1245,14 +1169,12 @@ def settings_service_get_legal_and_support_settings( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetLegalAndSupportSettingsResponse: - """Get the legal and support settings + """GetLegalAndSupportSettings - Return the legal settings for the requested context + Get the legal and support settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_legal_and_support_settings_request: (required) + :type settings_service_get_legal_and_support_settings_request: SettingsServiceGetLegalAndSupportSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1275,9 +1197,8 @@ def settings_service_get_legal_and_support_settings( :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, + _param = self._get_legal_and_support_settings_serialize( + settings_service_get_legal_and_support_settings_request=settings_service_get_legal_and_support_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1286,8 +1207,6 @@ def settings_service_get_legal_and_support_settings( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetLegalAndSupportSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1301,10 +1220,9 @@ def settings_service_get_legal_and_support_settings( @validate_call - def settings_service_get_legal_and_support_settings_with_http_info( + def get_legal_and_support_settings_with_http_info( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_legal_and_support_settings_request: SettingsServiceGetLegalAndSupportSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1318,14 +1236,12 @@ def settings_service_get_legal_and_support_settings_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SettingsServiceGetLegalAndSupportSettingsResponse]: - """Get the legal and support settings + """GetLegalAndSupportSettings - Return the legal settings for the requested context + Get the legal and support settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_legal_and_support_settings_request: (required) + :type settings_service_get_legal_and_support_settings_request: SettingsServiceGetLegalAndSupportSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1348,9 +1264,8 @@ def settings_service_get_legal_and_support_settings_with_http_info( :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, + _param = self._get_legal_and_support_settings_serialize( + settings_service_get_legal_and_support_settings_request=settings_service_get_legal_and_support_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1359,8 +1274,6 @@ def settings_service_get_legal_and_support_settings_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetLegalAndSupportSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1374,10 +1287,9 @@ def settings_service_get_legal_and_support_settings_with_http_info( @validate_call - def settings_service_get_legal_and_support_settings_without_preload_content( + def get_legal_and_support_settings_without_preload_content( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_legal_and_support_settings_request: SettingsServiceGetLegalAndSupportSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1391,14 +1303,12 @@ def settings_service_get_legal_and_support_settings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the legal and support settings + """GetLegalAndSupportSettings - Return the legal settings for the requested context + Get the legal and support settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_legal_and_support_settings_request: (required) + :type settings_service_get_legal_and_support_settings_request: SettingsServiceGetLegalAndSupportSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1421,9 +1331,8 @@ def settings_service_get_legal_and_support_settings_without_preload_content( :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, + _param = self._get_legal_and_support_settings_serialize( + settings_service_get_legal_and_support_settings_request=settings_service_get_legal_and_support_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1432,8 +1341,6 @@ def settings_service_get_legal_and_support_settings_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetLegalAndSupportSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1442,10 +1349,9 @@ def settings_service_get_legal_and_support_settings_without_preload_content( return response_data.response - def _settings_service_get_legal_and_support_settings_serialize( + def _get_legal_and_support_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_legal_and_support_settings_request, _request_auth, _content_type, _headers, @@ -1468,17 +1374,11 @@ def _settings_service_get_legal_and_support_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 + if settings_service_get_legal_and_support_settings_request is not None: + _body_params = settings_service_get_legal_and_support_settings_request # set the HTTP header `Accept` @@ -1489,6 +1389,19 @@ def _settings_service_get_legal_and_support_settings_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] = [ @@ -1496,8 +1409,8 @@ def _settings_service_get_legal_and_support_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/legal_support', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetLegalAndSupportSettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1514,10 +1427,9 @@ def _settings_service_get_legal_and_support_settings_serialize( @validate_call - def settings_service_get_lockout_settings( + def get_lockout_settings( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_lockout_settings_request: SettingsServiceGetLockoutSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1531,14 +1443,12 @@ def settings_service_get_lockout_settings( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetLockoutSettingsResponse: - """Get the lockout settings + """GetLockoutSettings - Return the lockout settings for the requested context, which define when a user will be locked + Get the lockout settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_lockout_settings_request: (required) + :type settings_service_get_lockout_settings_request: SettingsServiceGetLockoutSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1561,9 +1471,8 @@ def settings_service_get_lockout_settings( :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, + _param = self._get_lockout_settings_serialize( + settings_service_get_lockout_settings_request=settings_service_get_lockout_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1572,8 +1481,6 @@ def settings_service_get_lockout_settings( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetLockoutSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1587,10 +1494,9 @@ def settings_service_get_lockout_settings( @validate_call - def settings_service_get_lockout_settings_with_http_info( + def get_lockout_settings_with_http_info( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_lockout_settings_request: SettingsServiceGetLockoutSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1604,14 +1510,12 @@ def settings_service_get_lockout_settings_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SettingsServiceGetLockoutSettingsResponse]: - """Get the lockout settings + """GetLockoutSettings - Return the lockout settings for the requested context, which define when a user will be locked + Get the lockout settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_lockout_settings_request: (required) + :type settings_service_get_lockout_settings_request: SettingsServiceGetLockoutSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1634,9 +1538,8 @@ def settings_service_get_lockout_settings_with_http_info( :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, + _param = self._get_lockout_settings_serialize( + settings_service_get_lockout_settings_request=settings_service_get_lockout_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1645,8 +1548,6 @@ def settings_service_get_lockout_settings_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetLockoutSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1660,10 +1561,9 @@ def settings_service_get_lockout_settings_with_http_info( @validate_call - def settings_service_get_lockout_settings_without_preload_content( + def get_lockout_settings_without_preload_content( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_lockout_settings_request: SettingsServiceGetLockoutSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1677,14 +1577,12 @@ def settings_service_get_lockout_settings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the lockout settings + """GetLockoutSettings - Return the lockout settings for the requested context, which define when a user will be locked + Get the lockout settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_lockout_settings_request: (required) + :type settings_service_get_lockout_settings_request: SettingsServiceGetLockoutSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1707,9 +1605,8 @@ def settings_service_get_lockout_settings_without_preload_content( :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, + _param = self._get_lockout_settings_serialize( + settings_service_get_lockout_settings_request=settings_service_get_lockout_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1718,8 +1615,6 @@ def settings_service_get_lockout_settings_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetLockoutSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1728,10 +1623,9 @@ def settings_service_get_lockout_settings_without_preload_content( return response_data.response - def _settings_service_get_lockout_settings_serialize( + def _get_lockout_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_lockout_settings_request, _request_auth, _content_type, _headers, @@ -1754,17 +1648,11 @@ def _settings_service_get_lockout_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 + if settings_service_get_lockout_settings_request is not None: + _body_params = settings_service_get_lockout_settings_request # set the HTTP header `Accept` @@ -1775,6 +1663,19 @@ def _settings_service_get_lockout_settings_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] = [ @@ -1782,8 +1683,8 @@ def _settings_service_get_lockout_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/lockout', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetLockoutSettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1800,10 +1701,9 @@ def _settings_service_get_lockout_settings_serialize( @validate_call - def settings_service_get_login_settings( + def get_login_settings( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_login_settings_request: SettingsServiceGetLoginSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1817,14 +1717,12 @@ def settings_service_get_login_settings( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetLoginSettingsResponse: - """Get the login settings + """GetLoginSettings - Return the settings for the requested context + Get the login settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_login_settings_request: (required) + :type settings_service_get_login_settings_request: SettingsServiceGetLoginSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1847,9 +1745,8 @@ def settings_service_get_login_settings( :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, + _param = self._get_login_settings_serialize( + settings_service_get_login_settings_request=settings_service_get_login_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1858,8 +1755,6 @@ def settings_service_get_login_settings( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetLoginSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1873,10 +1768,9 @@ def settings_service_get_login_settings( @validate_call - def settings_service_get_login_settings_with_http_info( + def get_login_settings_with_http_info( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_login_settings_request: SettingsServiceGetLoginSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1890,14 +1784,12 @@ def settings_service_get_login_settings_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SettingsServiceGetLoginSettingsResponse]: - """Get the login settings + """GetLoginSettings - Return the settings for the requested context + Get the login settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_login_settings_request: (required) + :type settings_service_get_login_settings_request: SettingsServiceGetLoginSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1920,9 +1812,8 @@ def settings_service_get_login_settings_with_http_info( :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, + _param = self._get_login_settings_serialize( + settings_service_get_login_settings_request=settings_service_get_login_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1931,8 +1822,6 @@ def settings_service_get_login_settings_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetLoginSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1946,10 +1835,9 @@ def settings_service_get_login_settings_with_http_info( @validate_call - def settings_service_get_login_settings_without_preload_content( + def get_login_settings_without_preload_content( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_login_settings_request: SettingsServiceGetLoginSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1963,14 +1851,12 @@ def settings_service_get_login_settings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the login settings + """GetLoginSettings - Return the settings for the requested context + Get the login settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_login_settings_request: (required) + :type settings_service_get_login_settings_request: SettingsServiceGetLoginSettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1993,9 +1879,8 @@ def settings_service_get_login_settings_without_preload_content( :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, + _param = self._get_login_settings_serialize( + settings_service_get_login_settings_request=settings_service_get_login_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2004,8 +1889,6 @@ def settings_service_get_login_settings_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetLoginSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2014,10 +1897,9 @@ def settings_service_get_login_settings_without_preload_content( return response_data.response - def _settings_service_get_login_settings_serialize( + def _get_login_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_login_settings_request, _request_auth, _content_type, _headers, @@ -2040,17 +1922,11 @@ 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 + if settings_service_get_login_settings_request is not None: + _body_params = settings_service_get_login_settings_request # set the HTTP header `Accept` @@ -2061,6 +1937,19 @@ def _settings_service_get_login_settings_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] = [ @@ -2068,8 +1957,8 @@ def _settings_service_get_login_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/login', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetLoginSettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2086,10 +1975,9 @@ def _settings_service_get_login_settings_serialize( @validate_call - def settings_service_get_password_complexity_settings( + def get_password_complexity_settings( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_password_complexity_settings_request: SettingsServiceGetPasswordComplexitySettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2103,14 +1991,12 @@ def settings_service_get_password_complexity_settings( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetPasswordComplexitySettingsResponse: - """Get the password complexity settings + """GetPasswordComplexitySettings - Return the password complexity settings for the requested context + Get the password complexity settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_password_complexity_settings_request: (required) + :type settings_service_get_password_complexity_settings_request: SettingsServiceGetPasswordComplexitySettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2133,9 +2019,8 @@ def settings_service_get_password_complexity_settings( :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, + _param = self._get_password_complexity_settings_serialize( + settings_service_get_password_complexity_settings_request=settings_service_get_password_complexity_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2144,8 +2029,6 @@ def settings_service_get_password_complexity_settings( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetPasswordComplexitySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2159,10 +2042,9 @@ def settings_service_get_password_complexity_settings( @validate_call - def settings_service_get_password_complexity_settings_with_http_info( + def get_password_complexity_settings_with_http_info( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_password_complexity_settings_request: SettingsServiceGetPasswordComplexitySettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2176,14 +2058,12 @@ def settings_service_get_password_complexity_settings_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SettingsServiceGetPasswordComplexitySettingsResponse]: - """Get the password complexity settings + """GetPasswordComplexitySettings - Return the password complexity settings for the requested context + Get the password complexity settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_password_complexity_settings_request: (required) + :type settings_service_get_password_complexity_settings_request: SettingsServiceGetPasswordComplexitySettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2206,9 +2086,8 @@ def settings_service_get_password_complexity_settings_with_http_info( :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, + _param = self._get_password_complexity_settings_serialize( + settings_service_get_password_complexity_settings_request=settings_service_get_password_complexity_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2217,8 +2096,6 @@ def settings_service_get_password_complexity_settings_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetPasswordComplexitySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2232,10 +2109,9 @@ def settings_service_get_password_complexity_settings_with_http_info( @validate_call - def settings_service_get_password_complexity_settings_without_preload_content( + def get_password_complexity_settings_without_preload_content( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_password_complexity_settings_request: SettingsServiceGetPasswordComplexitySettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2249,14 +2125,12 @@ def settings_service_get_password_complexity_settings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the password complexity settings + """GetPasswordComplexitySettings - Return the password complexity settings for the requested context + Get the password complexity settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_password_complexity_settings_request: (required) + :type settings_service_get_password_complexity_settings_request: SettingsServiceGetPasswordComplexitySettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2279,9 +2153,8 @@ 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( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, + _param = self._get_password_complexity_settings_serialize( + settings_service_get_password_complexity_settings_request=settings_service_get_password_complexity_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2290,8 +2163,6 @@ def settings_service_get_password_complexity_settings_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetPasswordComplexitySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2300,10 +2171,9 @@ def settings_service_get_password_complexity_settings_without_preload_content( return response_data.response - def _settings_service_get_password_complexity_settings_serialize( + def _get_password_complexity_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_password_complexity_settings_request, _request_auth, _content_type, _headers, @@ -2326,17 +2196,11 @@ def _settings_service_get_password_complexity_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 + if settings_service_get_password_complexity_settings_request is not None: + _body_params = settings_service_get_password_complexity_settings_request # set the HTTP header `Accept` @@ -2347,6 +2211,19 @@ def _settings_service_get_password_complexity_settings_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] = [ @@ -2354,8 +2231,8 @@ def _settings_service_get_password_complexity_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/password/complexity', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetPasswordComplexitySettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2372,10 +2249,9 @@ def _settings_service_get_password_complexity_settings_serialize( @validate_call - def settings_service_get_password_expiry_settings( + def get_password_expiry_settings( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_password_expiry_settings_request: SettingsServiceGetPasswordExpirySettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2389,14 +2265,12 @@ def settings_service_get_password_expiry_settings( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetPasswordExpirySettingsResponse: - """Get the password expiry settings + """GetPasswordExpirySettings - Return the password expiry settings for the requested context + Get the password expiry settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_password_expiry_settings_request: (required) + :type settings_service_get_password_expiry_settings_request: SettingsServiceGetPasswordExpirySettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2419,9 +2293,8 @@ def settings_service_get_password_expiry_settings( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_password_expiry_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, + _param = self._get_password_expiry_settings_serialize( + settings_service_get_password_expiry_settings_request=settings_service_get_password_expiry_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2430,8 +2303,6 @@ def settings_service_get_password_expiry_settings( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetPasswordExpirySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2445,10 +2316,9 @@ def settings_service_get_password_expiry_settings( @validate_call - def settings_service_get_password_expiry_settings_with_http_info( + def get_password_expiry_settings_with_http_info( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_password_expiry_settings_request: SettingsServiceGetPasswordExpirySettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2462,14 +2332,12 @@ def settings_service_get_password_expiry_settings_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SettingsServiceGetPasswordExpirySettingsResponse]: - """Get the password expiry settings + """GetPasswordExpirySettings - Return the password expiry settings for the requested context + Get the password expiry settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_password_expiry_settings_request: (required) + :type settings_service_get_password_expiry_settings_request: SettingsServiceGetPasswordExpirySettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2492,9 +2360,8 @@ def settings_service_get_password_expiry_settings_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_password_expiry_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, + _param = self._get_password_expiry_settings_serialize( + settings_service_get_password_expiry_settings_request=settings_service_get_password_expiry_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2503,8 +2370,6 @@ def settings_service_get_password_expiry_settings_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetPasswordExpirySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2518,10 +2383,9 @@ def settings_service_get_password_expiry_settings_with_http_info( @validate_call - def settings_service_get_password_expiry_settings_without_preload_content( + def get_password_expiry_settings_without_preload_content( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, + settings_service_get_password_expiry_settings_request: SettingsServiceGetPasswordExpirySettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2535,14 +2399,12 @@ def settings_service_get_password_expiry_settings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the password expiry settings + """GetPasswordExpirySettings - Return the password expiry settings for the requested context + Get the password expiry settings - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + :param settings_service_get_password_expiry_settings_request: (required) + :type settings_service_get_password_expiry_settings_request: SettingsServiceGetPasswordExpirySettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2565,9 +2427,8 @@ 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( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, + _param = self._get_password_expiry_settings_serialize( + settings_service_get_password_expiry_settings_request=settings_service_get_password_expiry_settings_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2576,8 +2437,6 @@ def settings_service_get_password_expiry_settings_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetPasswordExpirySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2586,10 +2445,9 @@ def settings_service_get_password_expiry_settings_without_preload_content( return response_data.response - def _settings_service_get_password_expiry_settings_serialize( + def _get_password_expiry_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_password_expiry_settings_request, _request_auth, _content_type, _headers, @@ -2612,17 +2470,11 @@ def _settings_service_get_password_expiry_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 + if settings_service_get_password_expiry_settings_request is not None: + _body_params = settings_service_get_password_expiry_settings_request # set the HTTP header `Accept` @@ -2633,6 +2485,19 @@ def _settings_service_get_password_expiry_settings_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] = [ @@ -2640,8 +2505,8 @@ def _settings_service_get_password_expiry_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/password/expiry', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetPasswordExpirySettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2658,8 +2523,9 @@ def _settings_service_get_password_expiry_settings_serialize( @validate_call - def settings_service_get_security_settings( + def get_security_settings( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2673,10 +2539,12 @@ def settings_service_get_security_settings( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetSecuritySettingsResponse: - """Get Security Settings + """GetSecuritySettings - Returns the security settings of the ZITADEL instance. + Get the security settings + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2699,7 +2567,8 @@ def settings_service_get_security_settings( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_security_settings_serialize( + _param = self._get_security_settings_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2708,8 +2577,6 @@ def settings_service_get_security_settings( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2723,8 +2590,9 @@ def settings_service_get_security_settings( @validate_call - def settings_service_get_security_settings_with_http_info( + def get_security_settings_with_http_info( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2738,10 +2606,12 @@ def settings_service_get_security_settings_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SettingsServiceGetSecuritySettingsResponse]: - """Get Security Settings + """GetSecuritySettings - Returns the security settings of the ZITADEL instance. + Get the security settings + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2764,7 +2634,8 @@ 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._get_security_settings_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2773,8 +2644,6 @@ def settings_service_get_security_settings_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2788,8 +2657,9 @@ def settings_service_get_security_settings_with_http_info( @validate_call - def settings_service_get_security_settings_without_preload_content( + def get_security_settings_without_preload_content( self, + body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2803,10 +2673,12 @@ def settings_service_get_security_settings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Security Settings + """GetSecuritySettings - Returns the security settings of the ZITADEL instance. + Get the security settings + :param body: (required) + :type body: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2829,7 +2701,8 @@ 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._get_security_settings_serialize( + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2838,8 +2711,6 @@ def settings_service_get_security_settings_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2848,8 +2719,9 @@ def settings_service_get_security_settings_without_preload_content( return response_data.response - def _settings_service_get_security_settings_serialize( + def _get_security_settings_serialize( self, + body, _request_auth, _content_type, _headers, @@ -2875,6 +2747,8 @@ def _settings_service_get_security_settings_serialize( # process the header parameters # process the form parameters # process the body parameter + if body is not None: + _body_params = body # set the HTTP header `Accept` @@ -2885,6 +2759,19 @@ def _settings_service_get_security_settings_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] = [ @@ -2892,8 +2779,8 @@ def _settings_service_get_security_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/security', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetSecuritySettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2910,7 +2797,7 @@ def _settings_service_get_security_settings_serialize( @validate_call - def settings_service_set_security_settings( + def set_security_settings( self, settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, _request_timeout: Union[ @@ -2926,9 +2813,9 @@ def settings_service_set_security_settings( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceSetSecuritySettingsResponse: - """Set Security Settings + """SetSecuritySettings - Set the security settings of the ZITADEL instance. + Set the security settings :param settings_service_set_security_settings_request: (required) :type settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest @@ -2954,7 +2841,7 @@ def settings_service_set_security_settings( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_set_security_settings_serialize( + _param = self._set_security_settings_serialize( settings_service_set_security_settings_request=settings_service_set_security_settings_request, _request_auth=_request_auth, _content_type=_content_type, @@ -2964,8 +2851,6 @@ def settings_service_set_security_settings( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceSetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2979,7 +2864,7 @@ def settings_service_set_security_settings( @validate_call - def settings_service_set_security_settings_with_http_info( + def set_security_settings_with_http_info( self, settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, _request_timeout: Union[ @@ -2995,9 +2880,9 @@ def settings_service_set_security_settings_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SettingsServiceSetSecuritySettingsResponse]: - """Set Security Settings + """SetSecuritySettings - Set the security settings of the ZITADEL instance. + Set the security settings :param settings_service_set_security_settings_request: (required) :type settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest @@ -3023,7 +2908,7 @@ def settings_service_set_security_settings_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_set_security_settings_serialize( + _param = self._set_security_settings_serialize( settings_service_set_security_settings_request=settings_service_set_security_settings_request, _request_auth=_request_auth, _content_type=_content_type, @@ -3033,8 +2918,6 @@ def settings_service_set_security_settings_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceSetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3048,7 +2931,7 @@ def settings_service_set_security_settings_with_http_info( @validate_call - def settings_service_set_security_settings_without_preload_content( + def set_security_settings_without_preload_content( self, settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, _request_timeout: Union[ @@ -3064,9 +2947,9 @@ def settings_service_set_security_settings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Set Security Settings + """SetSecuritySettings - Set the security settings of the ZITADEL instance. + Set the security settings :param settings_service_set_security_settings_request: (required) :type settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest @@ -3092,7 +2975,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._set_security_settings_serialize( settings_service_set_security_settings_request=settings_service_set_security_settings_request, _request_auth=_request_auth, _content_type=_content_type, @@ -3102,8 +2985,6 @@ def settings_service_set_security_settings_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceSetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3112,7 +2993,7 @@ def settings_service_set_security_settings_without_preload_content( return response_data.response - def _settings_service_set_security_settings_serialize( + def _set_security_settings_serialize( self, settings_service_set_security_settings_request, _request_auth, @@ -3172,8 +3053,8 @@ def _settings_service_set_security_settings_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/policies/security', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/SetSecuritySettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/user_service_api.py b/zitadel_client/api/user_service_api.py index 2c7f5c25..8dcca658 100644 --- a/zitadel_client/api/user_service_api.py +++ b/zitadel_client/api/user_service_api.py @@ -16,48 +16,66 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import List, Optional -from typing_extensions import Annotated +from zitadel_client.models.no_op200_response4 import NoOp200Response4 from zitadel_client.models.user_service_add_human_user_request import UserServiceAddHumanUserRequest from zitadel_client.models.user_service_add_human_user_response import UserServiceAddHumanUserResponse from zitadel_client.models.user_service_add_idp_link_request import UserServiceAddIDPLinkRequest from zitadel_client.models.user_service_add_idp_link_response import UserServiceAddIDPLinkResponse +from zitadel_client.models.user_service_add_otp_email_request import UserServiceAddOTPEmailRequest from zitadel_client.models.user_service_add_otp_email_response import UserServiceAddOTPEmailResponse +from zitadel_client.models.user_service_add_otpsms_request import UserServiceAddOTPSMSRequest from zitadel_client.models.user_service_add_otpsms_response import UserServiceAddOTPSMSResponse from zitadel_client.models.user_service_create_invite_code_request import UserServiceCreateInviteCodeRequest from zitadel_client.models.user_service_create_invite_code_response import UserServiceCreateInviteCodeResponse from zitadel_client.models.user_service_create_passkey_registration_link_request import UserServiceCreatePasskeyRegistrationLinkRequest from zitadel_client.models.user_service_create_passkey_registration_link_response import UserServiceCreatePasskeyRegistrationLinkResponse +from zitadel_client.models.user_service_deactivate_user_request import UserServiceDeactivateUserRequest from zitadel_client.models.user_service_deactivate_user_response import UserServiceDeactivateUserResponse +from zitadel_client.models.user_service_delete_user_request import UserServiceDeleteUserRequest from zitadel_client.models.user_service_delete_user_response import UserServiceDeleteUserResponse +from zitadel_client.models.user_service_get_user_by_id_request import UserServiceGetUserByIDRequest from zitadel_client.models.user_service_get_user_by_id_response import UserServiceGetUserByIDResponse +from zitadel_client.models.user_service_human_mfa_init_skipped_request import UserServiceHumanMFAInitSkippedRequest from zitadel_client.models.user_service_human_mfa_init_skipped_response import UserServiceHumanMFAInitSkippedResponse +from zitadel_client.models.user_service_list_authentication_factors_request import UserServiceListAuthenticationFactorsRequest from zitadel_client.models.user_service_list_authentication_factors_response import UserServiceListAuthenticationFactorsResponse +from zitadel_client.models.user_service_list_authentication_method_types_request import UserServiceListAuthenticationMethodTypesRequest from zitadel_client.models.user_service_list_authentication_method_types_response import UserServiceListAuthenticationMethodTypesResponse from zitadel_client.models.user_service_list_idp_links_request import UserServiceListIDPLinksRequest from zitadel_client.models.user_service_list_idp_links_response import UserServiceListIDPLinksResponse +from zitadel_client.models.user_service_list_passkeys_request import UserServiceListPasskeysRequest from zitadel_client.models.user_service_list_passkeys_response import UserServiceListPasskeysResponse from zitadel_client.models.user_service_list_users_request import UserServiceListUsersRequest from zitadel_client.models.user_service_list_users_response import UserServiceListUsersResponse +from zitadel_client.models.user_service_lock_user_request import UserServiceLockUserRequest from zitadel_client.models.user_service_lock_user_response import UserServiceLockUserResponse from zitadel_client.models.user_service_password_reset_request import UserServicePasswordResetRequest from zitadel_client.models.user_service_password_reset_response import UserServicePasswordResetResponse +from zitadel_client.models.user_service_reactivate_user_request import UserServiceReactivateUserRequest from zitadel_client.models.user_service_reactivate_user_response import UserServiceReactivateUserResponse from zitadel_client.models.user_service_register_passkey_request import UserServiceRegisterPasskeyRequest from zitadel_client.models.user_service_register_passkey_response import UserServiceRegisterPasskeyResponse +from zitadel_client.models.user_service_register_totp_request import UserServiceRegisterTOTPRequest from zitadel_client.models.user_service_register_totp_response import UserServiceRegisterTOTPResponse from zitadel_client.models.user_service_register_u2_f_request import UserServiceRegisterU2FRequest from zitadel_client.models.user_service_register_u2_f_response import UserServiceRegisterU2FResponse +from zitadel_client.models.user_service_remove_idp_link_request import UserServiceRemoveIDPLinkRequest from zitadel_client.models.user_service_remove_idp_link_response import UserServiceRemoveIDPLinkResponse +from zitadel_client.models.user_service_remove_otp_email_request import UserServiceRemoveOTPEmailRequest from zitadel_client.models.user_service_remove_otp_email_response import UserServiceRemoveOTPEmailResponse +from zitadel_client.models.user_service_remove_otpsms_request import UserServiceRemoveOTPSMSRequest from zitadel_client.models.user_service_remove_otpsms_response import UserServiceRemoveOTPSMSResponse +from zitadel_client.models.user_service_remove_passkey_request import UserServiceRemovePasskeyRequest from zitadel_client.models.user_service_remove_passkey_response import UserServiceRemovePasskeyResponse +from zitadel_client.models.user_service_remove_phone_request import UserServiceRemovePhoneRequest from zitadel_client.models.user_service_remove_phone_response import UserServiceRemovePhoneResponse +from zitadel_client.models.user_service_remove_totp_request import UserServiceRemoveTOTPRequest from zitadel_client.models.user_service_remove_totp_response import UserServiceRemoveTOTPResponse +from zitadel_client.models.user_service_remove_u2_f_request import UserServiceRemoveU2FRequest from zitadel_client.models.user_service_remove_u2_f_response import UserServiceRemoveU2FResponse from zitadel_client.models.user_service_resend_email_code_request import UserServiceResendEmailCodeRequest from zitadel_client.models.user_service_resend_email_code_response import UserServiceResendEmailCodeResponse +from zitadel_client.models.user_service_resend_invite_code_request import UserServiceResendInviteCodeRequest from zitadel_client.models.user_service_resend_invite_code_response import UserServiceResendInviteCodeResponse from zitadel_client.models.user_service_resend_phone_code_request import UserServiceResendPhoneCodeRequest from zitadel_client.models.user_service_resend_phone_code_response import UserServiceResendPhoneCodeResponse @@ -73,6 +91,7 @@ from zitadel_client.models.user_service_set_phone_response import UserServiceSetPhoneResponse from zitadel_client.models.user_service_start_identity_provider_intent_request import UserServiceStartIdentityProviderIntentRequest from zitadel_client.models.user_service_start_identity_provider_intent_response import UserServiceStartIdentityProviderIntentResponse +from zitadel_client.models.user_service_unlock_user_request import UserServiceUnlockUserRequest from zitadel_client.models.user_service_unlock_user_response import UserServiceUnlockUserResponse from zitadel_client.models.user_service_update_human_user_request import UserServiceUpdateHumanUserRequest from zitadel_client.models.user_service_update_human_user_response import UserServiceUpdateHumanUserResponse @@ -108,7 +127,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def user_service_add_human_user( + def add_human_user( self, user_service_add_human_user_request: UserServiceAddHumanUserRequest, _request_timeout: Union[ @@ -124,9 +143,9 @@ def user_service_add_human_user( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceAddHumanUserResponse: - """Create a new human user + """AddHumanUser - 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. + Create a new human 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. :param user_service_add_human_user_request: (required) :type user_service_add_human_user_request: UserServiceAddHumanUserRequest @@ -152,7 +171,7 @@ def user_service_add_human_user( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_human_user_serialize( + _param = self._add_human_user_serialize( user_service_add_human_user_request=user_service_add_human_user_request, _request_auth=_request_auth, _content_type=_content_type, @@ -161,9 +180,7 @@ def user_service_add_human_user( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "UserServiceAddHumanUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceAddHumanUserResponse", } response_data = self.api_client.call_api( *_param, @@ -177,7 +194,7 @@ def user_service_add_human_user( @validate_call - def user_service_add_human_user_with_http_info( + def add_human_user_with_http_info( self, user_service_add_human_user_request: UserServiceAddHumanUserRequest, _request_timeout: Union[ @@ -193,9 +210,9 @@ def user_service_add_human_user_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceAddHumanUserResponse]: - """Create a new human user + """AddHumanUser - 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. + Create a new human 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. :param user_service_add_human_user_request: (required) :type user_service_add_human_user_request: UserServiceAddHumanUserRequest @@ -221,7 +238,7 @@ def user_service_add_human_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_human_user_serialize( + _param = self._add_human_user_serialize( user_service_add_human_user_request=user_service_add_human_user_request, _request_auth=_request_auth, _content_type=_content_type, @@ -230,9 +247,7 @@ def user_service_add_human_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "UserServiceAddHumanUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceAddHumanUserResponse", } response_data = self.api_client.call_api( *_param, @@ -246,7 +261,7 @@ def user_service_add_human_user_with_http_info( @validate_call - def user_service_add_human_user_without_preload_content( + def add_human_user_without_preload_content( self, user_service_add_human_user_request: UserServiceAddHumanUserRequest, _request_timeout: Union[ @@ -262,9 +277,9 @@ def user_service_add_human_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create a new human user + """AddHumanUser - 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. + Create a new human 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. :param user_service_add_human_user_request: (required) :type user_service_add_human_user_request: UserServiceAddHumanUserRequest @@ -290,7 +305,7 @@ def user_service_add_human_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_human_user_serialize( + _param = self._add_human_user_serialize( user_service_add_human_user_request=user_service_add_human_user_request, _request_auth=_request_auth, _content_type=_content_type, @@ -299,9 +314,7 @@ def user_service_add_human_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "UserServiceAddHumanUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceAddHumanUserResponse", } response_data = self.api_client.call_api( *_param, @@ -310,7 +323,7 @@ def user_service_add_human_user_without_preload_content( return response_data.response - def _user_service_add_human_user_serialize( + def _add_human_user_serialize( self, user_service_add_human_user_request, _request_auth, @@ -371,7 +384,7 @@ def _user_service_add_human_user_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/human', + resource_path='/zitadel.user.v2.UserService/AddHumanUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -388,9 +401,8 @@ def _user_service_add_human_user_serialize( @validate_call - def user_service_add_idp_link( + def add_idp_link( self, - user_id: StrictStr, user_service_add_idp_link_request: UserServiceAddIDPLinkRequest, _request_timeout: Union[ None, @@ -405,12 +417,10 @@ def user_service_add_idp_link( _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 + """AddIDPLink - Add link to an identity provider to an user.. + Add link to an identity provider to an user Add link to an identity provider to an user.. - :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 @@ -435,8 +445,7 @@ def user_service_add_idp_link( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_idp_link_serialize( - user_id=user_id, + _param = self._add_idp_link_serialize( user_service_add_idp_link_request=user_service_add_idp_link_request, _request_auth=_request_auth, _content_type=_content_type, @@ -446,8 +455,6 @@ def user_service_add_idp_link( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceAddIDPLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -461,9 +468,8 @@ def user_service_add_idp_link( @validate_call - def user_service_add_idp_link_with_http_info( + def add_idp_link_with_http_info( self, - user_id: StrictStr, user_service_add_idp_link_request: UserServiceAddIDPLinkRequest, _request_timeout: Union[ None, @@ -478,12 +484,10 @@ def user_service_add_idp_link_with_http_info( _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 + """AddIDPLink - Add link to an identity provider to an user.. + Add link to an identity provider to an user Add link to an identity provider to an user.. - :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 @@ -508,8 +512,7 @@ def user_service_add_idp_link_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_idp_link_serialize( - user_id=user_id, + _param = self._add_idp_link_serialize( user_service_add_idp_link_request=user_service_add_idp_link_request, _request_auth=_request_auth, _content_type=_content_type, @@ -519,8 +522,6 @@ def user_service_add_idp_link_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceAddIDPLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -534,9 +535,8 @@ def user_service_add_idp_link_with_http_info( @validate_call - def user_service_add_idp_link_without_preload_content( + def add_idp_link_without_preload_content( self, - user_id: StrictStr, user_service_add_idp_link_request: UserServiceAddIDPLinkRequest, _request_timeout: Union[ None, @@ -551,12 +551,10 @@ def user_service_add_idp_link_without_preload_content( _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 + """AddIDPLink - Add link to an identity provider to an user.. + Add link to an identity provider to an user Add link to an identity provider to an user.. - :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 @@ -581,8 +579,7 @@ def user_service_add_idp_link_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_idp_link_serialize( - user_id=user_id, + _param = self._add_idp_link_serialize( user_service_add_idp_link_request=user_service_add_idp_link_request, _request_auth=_request_auth, _content_type=_content_type, @@ -592,8 +589,6 @@ def user_service_add_idp_link_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceAddIDPLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -602,9 +597,8 @@ def user_service_add_idp_link_without_preload_content( return response_data.response - def _user_service_add_idp_link_serialize( + def _add_idp_link_serialize( self, - user_id, user_service_add_idp_link_request, _request_auth, _content_type, @@ -627,8 +621,6 @@ def _user_service_add_idp_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 @@ -666,7 +658,7 @@ def _user_service_add_idp_link_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/links', + resource_path='/zitadel.user.v2.UserService/AddIDPLink', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -683,9 +675,9 @@ def _user_service_add_idp_link_serialize( @validate_call - def user_service_add_otp_email( + def add_otp_email( self, - user_id: StrictStr, + user_service_add_otp_email_request: UserServiceAddOTPEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -699,12 +691,12 @@ def user_service_add_otp_email( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceAddOTPEmailResponse: - """Add OTP Email for a user + """AddOTPEmail - 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.. + 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 user_service_add_otp_email_request: (required) + :type user_service_add_otp_email_request: UserServiceAddOTPEmailRequest :param _request_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 +719,8 @@ def user_service_add_otp_email( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_otp_email_serialize( - user_id=user_id, + _param = self._add_otp_email_serialize( + user_service_add_otp_email_request=user_service_add_otp_email_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -737,8 +729,6 @@ def user_service_add_otp_email( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceAddOTPEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -752,9 +742,9 @@ def user_service_add_otp_email( @validate_call - def user_service_add_otp_email_with_http_info( + def add_otp_email_with_http_info( self, - user_id: StrictStr, + user_service_add_otp_email_request: UserServiceAddOTPEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -768,12 +758,12 @@ def user_service_add_otp_email_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceAddOTPEmailResponse]: - """Add OTP Email for a user + """AddOTPEmail - 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.. + 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 user_service_add_otp_email_request: (required) + :type user_service_add_otp_email_request: UserServiceAddOTPEmailRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -796,8 +786,8 @@ def user_service_add_otp_email_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_otp_email_serialize( - user_id=user_id, + _param = self._add_otp_email_serialize( + user_service_add_otp_email_request=user_service_add_otp_email_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -806,8 +796,6 @@ def user_service_add_otp_email_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceAddOTPEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -821,9 +809,9 @@ def user_service_add_otp_email_with_http_info( @validate_call - def user_service_add_otp_email_without_preload_content( + def add_otp_email_without_preload_content( self, - user_id: StrictStr, + user_service_add_otp_email_request: UserServiceAddOTPEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -837,12 +825,12 @@ def user_service_add_otp_email_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Add OTP Email for a user + """AddOTPEmail - 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.. + 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 user_service_add_otp_email_request: (required) + :type user_service_add_otp_email_request: UserServiceAddOTPEmailRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -865,8 +853,8 @@ def user_service_add_otp_email_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_otp_email_serialize( - user_id=user_id, + _param = self._add_otp_email_serialize( + user_service_add_otp_email_request=user_service_add_otp_email_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -875,8 +863,6 @@ def user_service_add_otp_email_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceAddOTPEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -885,9 +871,9 @@ def user_service_add_otp_email_without_preload_content( return response_data.response - def _user_service_add_otp_email_serialize( + def _add_otp_email_serialize( self, - user_id, + user_service_add_otp_email_request, _request_auth, _content_type, _headers, @@ -909,12 +895,12 @@ def _user_service_add_otp_email_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_otp_email_request is not None: + _body_params = user_service_add_otp_email_request # set the HTTP header `Accept` @@ -946,7 +932,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='/zitadel.user.v2.UserService/AddOTPEmail', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -963,9 +949,9 @@ def _user_service_add_otp_email_serialize( @validate_call - def user_service_add_otpsms( + def add_otpsms( self, - user_id: StrictStr, + user_service_add_otpsms_request: UserServiceAddOTPSMSRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -979,12 +965,12 @@ def user_service_add_otpsms( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceAddOTPSMSResponse: - """Add OTP SMS for a user + """AddOTPSMS - 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.. + Add OTP SMS for a 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_otpsms_request: (required) + :type user_service_add_otpsms_request: UserServiceAddOTPSMSRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1007,8 +993,8 @@ def user_service_add_otpsms( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_otpsms_serialize( - user_id=user_id, + _param = self._add_otpsms_serialize( + user_service_add_otpsms_request=user_service_add_otpsms_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1017,8 +1003,6 @@ def user_service_add_otpsms( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceAddOTPSMSResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1032,9 +1016,9 @@ def user_service_add_otpsms( @validate_call - def user_service_add_otpsms_with_http_info( + def add_otpsms_with_http_info( self, - user_id: StrictStr, + user_service_add_otpsms_request: UserServiceAddOTPSMSRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1048,12 +1032,12 @@ def user_service_add_otpsms_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceAddOTPSMSResponse]: - """Add OTP SMS for a user + """AddOTPSMS - 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.. + Add OTP SMS for a 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_otpsms_request: (required) + :type user_service_add_otpsms_request: UserServiceAddOTPSMSRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1076,8 +1060,8 @@ def user_service_add_otpsms_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_otpsms_serialize( - user_id=user_id, + _param = self._add_otpsms_serialize( + user_service_add_otpsms_request=user_service_add_otpsms_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1086,8 +1070,6 @@ def user_service_add_otpsms_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceAddOTPSMSResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1101,9 +1083,9 @@ def user_service_add_otpsms_with_http_info( @validate_call - def user_service_add_otpsms_without_preload_content( + def add_otpsms_without_preload_content( self, - user_id: StrictStr, + user_service_add_otpsms_request: UserServiceAddOTPSMSRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1117,12 +1099,12 @@ def user_service_add_otpsms_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Add OTP SMS for a user + """AddOTPSMS - 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.. + Add OTP SMS for a 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_otpsms_request: (required) + :type user_service_add_otpsms_request: UserServiceAddOTPSMSRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1145,8 +1127,8 @@ def user_service_add_otpsms_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_otpsms_serialize( - user_id=user_id, + _param = self._add_otpsms_serialize( + user_service_add_otpsms_request=user_service_add_otpsms_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1155,8 +1137,6 @@ def user_service_add_otpsms_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceAddOTPSMSResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1165,9 +1145,9 @@ def user_service_add_otpsms_without_preload_content( return response_data.response - def _user_service_add_otpsms_serialize( + def _add_otpsms_serialize( self, - user_id, + user_service_add_otpsms_request, _request_auth, _content_type, _headers, @@ -1189,12 +1169,12 @@ def _user_service_add_otpsms_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_otpsms_request is not None: + _body_params = user_service_add_otpsms_request # set the HTTP header `Accept` @@ -1226,7 +1206,7 @@ def _user_service_add_otpsms_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/otp_sms', + resource_path='/zitadel.user.v2.UserService/AddOTPSMS', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1243,9 +1223,8 @@ def _user_service_add_otpsms_serialize( @validate_call - def user_service_create_invite_code( + def create_invite_code( self, - user_id: StrictStr, user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest, _request_timeout: Union[ None, @@ -1260,12 +1239,10 @@ def user_service_create_invite_code( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceCreateInviteCodeResponse: - """Create an invite code for a user + """CreateInviteCode - Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. + 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. If an invite code has been created previously, it's url template and application name will be used as defaults for the new code. The new code will overwrite the previous one and make it invalid. - :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 @@ -1290,8 +1267,7 @@ def user_service_create_invite_code( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_create_invite_code_serialize( - user_id=user_id, + _param = self._create_invite_code_serialize( user_service_create_invite_code_request=user_service_create_invite_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1301,8 +1277,6 @@ def user_service_create_invite_code( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceCreateInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1316,9 +1290,8 @@ def user_service_create_invite_code( @validate_call - def user_service_create_invite_code_with_http_info( + def create_invite_code_with_http_info( self, - user_id: StrictStr, user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest, _request_timeout: Union[ None, @@ -1333,12 +1306,10 @@ def user_service_create_invite_code_with_http_info( _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 + """CreateInviteCode - Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. + 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. If an invite code has been created previously, it's url template and application name will be used as defaults for the new code. The new code will overwrite the previous one and make it invalid. - :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 @@ -1363,8 +1334,7 @@ def user_service_create_invite_code_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_create_invite_code_serialize( - user_id=user_id, + _param = self._create_invite_code_serialize( user_service_create_invite_code_request=user_service_create_invite_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1374,8 +1344,6 @@ def user_service_create_invite_code_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceCreateInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1389,9 +1357,8 @@ def user_service_create_invite_code_with_http_info( @validate_call - def user_service_create_invite_code_without_preload_content( + def create_invite_code_without_preload_content( self, - user_id: StrictStr, user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest, _request_timeout: Union[ None, @@ -1406,12 +1373,10 @@ def user_service_create_invite_code_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create an invite code for a user + """CreateInviteCode - Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. + 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. If an invite code has been created previously, it's url template and application name will be used as defaults for the new code. The new code will overwrite the previous one and make it invalid. - :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 @@ -1436,8 +1401,7 @@ def user_service_create_invite_code_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_create_invite_code_serialize( - user_id=user_id, + _param = self._create_invite_code_serialize( user_service_create_invite_code_request=user_service_create_invite_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1447,8 +1411,6 @@ def user_service_create_invite_code_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceCreateInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1457,9 +1419,8 @@ def user_service_create_invite_code_without_preload_content( return response_data.response - def _user_service_create_invite_code_serialize( + def _create_invite_code_serialize( self, - user_id, user_service_create_invite_code_request, _request_auth, _content_type, @@ -1482,8 +1443,6 @@ def _user_service_create_invite_code_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 @@ -1521,7 +1480,7 @@ def _user_service_create_invite_code_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/invite_code', + resource_path='/zitadel.user.v2.UserService/CreateInviteCode', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1538,9 +1497,8 @@ def _user_service_create_invite_code_serialize( @validate_call - def user_service_create_passkey_registration_link( + def create_passkey_registration_link( self, - user_id: StrictStr, user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest, _request_timeout: Union[ None, @@ -1555,12 +1513,10 @@ def user_service_create_passkey_registration_link( _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 + """CreatePasskeyRegistrationLink - Create a passkey registration link which includes a code and either return it or send it to the user.. + Create a passkey registration link for a user 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 @@ -1585,8 +1541,7 @@ def user_service_create_passkey_registration_link( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_create_passkey_registration_link_serialize( - user_id=user_id, + _param = self._create_passkey_registration_link_serialize( user_service_create_passkey_registration_link_request=user_service_create_passkey_registration_link_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1596,8 +1551,6 @@ def user_service_create_passkey_registration_link( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceCreatePasskeyRegistrationLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1611,9 +1564,8 @@ def user_service_create_passkey_registration_link( @validate_call - def user_service_create_passkey_registration_link_with_http_info( + def create_passkey_registration_link_with_http_info( self, - user_id: StrictStr, user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest, _request_timeout: Union[ None, @@ -1628,12 +1580,10 @@ def user_service_create_passkey_registration_link_with_http_info( _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 + """CreatePasskeyRegistrationLink - Create a passkey registration link which includes a code and either return it or send it to the user.. + Create a passkey registration link for a user 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 @@ -1658,8 +1608,7 @@ 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( - user_id=user_id, + _param = self._create_passkey_registration_link_serialize( user_service_create_passkey_registration_link_request=user_service_create_passkey_registration_link_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1669,8 +1618,6 @@ def user_service_create_passkey_registration_link_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceCreatePasskeyRegistrationLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1684,9 +1631,8 @@ def user_service_create_passkey_registration_link_with_http_info( @validate_call - def user_service_create_passkey_registration_link_without_preload_content( + def create_passkey_registration_link_without_preload_content( self, - user_id: StrictStr, user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest, _request_timeout: Union[ None, @@ -1701,12 +1647,10 @@ def user_service_create_passkey_registration_link_without_preload_content( _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 + """CreatePasskeyRegistrationLink - Create a passkey registration link which includes a code and either return it or send it to the user.. + Create a passkey registration link for a user 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 @@ -1731,8 +1675,7 @@ 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, + _param = self._create_passkey_registration_link_serialize( user_service_create_passkey_registration_link_request=user_service_create_passkey_registration_link_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1742,8 +1685,6 @@ def user_service_create_passkey_registration_link_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceCreatePasskeyRegistrationLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1752,9 +1693,8 @@ def user_service_create_passkey_registration_link_without_preload_content( return response_data.response - def _user_service_create_passkey_registration_link_serialize( + def _create_passkey_registration_link_serialize( self, - user_id, user_service_create_passkey_registration_link_request, _request_auth, _content_type, @@ -1777,8 +1717,6 @@ 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 @@ -1816,7 +1754,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='/zitadel.user.v2.UserService/CreatePasskeyRegistrationLink', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1833,9 +1771,9 @@ def _user_service_create_passkey_registration_link_serialize( @validate_call - def user_service_deactivate_user( + def deactivate_user( self, - user_id: StrictStr, + user_service_deactivate_user_request: UserServiceDeactivateUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1849,12 +1787,12 @@ def user_service_deactivate_user( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceDeactivateUserResponse: - """Deactivate user + """DeactivateUser - 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.. + Deactivate 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.. - :param user_id: (required) - :type user_id: str + :param user_service_deactivate_user_request: (required) + :type user_service_deactivate_user_request: UserServiceDeactivateUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1877,8 +1815,8 @@ def user_service_deactivate_user( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_deactivate_user_serialize( - user_id=user_id, + _param = self._deactivate_user_serialize( + user_service_deactivate_user_request=user_service_deactivate_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1887,8 +1825,6 @@ def user_service_deactivate_user( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceDeactivateUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1902,9 +1838,9 @@ def user_service_deactivate_user( @validate_call - def user_service_deactivate_user_with_http_info( + def deactivate_user_with_http_info( self, - user_id: StrictStr, + user_service_deactivate_user_request: UserServiceDeactivateUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1918,12 +1854,12 @@ def user_service_deactivate_user_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceDeactivateUserResponse]: - """Deactivate user + """DeactivateUser - 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.. + Deactivate 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.. - :param user_id: (required) - :type user_id: str + :param user_service_deactivate_user_request: (required) + :type user_service_deactivate_user_request: UserServiceDeactivateUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1946,8 +1882,8 @@ def user_service_deactivate_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_deactivate_user_serialize( - user_id=user_id, + _param = self._deactivate_user_serialize( + user_service_deactivate_user_request=user_service_deactivate_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1956,8 +1892,6 @@ def user_service_deactivate_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceDeactivateUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -1971,9 +1905,9 @@ def user_service_deactivate_user_with_http_info( @validate_call - def user_service_deactivate_user_without_preload_content( + def deactivate_user_without_preload_content( self, - user_id: StrictStr, + user_service_deactivate_user_request: UserServiceDeactivateUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1987,12 +1921,12 @@ def user_service_deactivate_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Deactivate user + """DeactivateUser - 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.. + Deactivate 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.. - :param user_id: (required) - :type user_id: str + :param user_service_deactivate_user_request: (required) + :type user_service_deactivate_user_request: UserServiceDeactivateUserRequest :param _request_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 +1949,8 @@ def user_service_deactivate_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_deactivate_user_serialize( - user_id=user_id, + _param = self._deactivate_user_serialize( + user_service_deactivate_user_request=user_service_deactivate_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2025,8 +1959,6 @@ def user_service_deactivate_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceDeactivateUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2035,9 +1967,9 @@ def user_service_deactivate_user_without_preload_content( return response_data.response - def _user_service_deactivate_user_serialize( + def _deactivate_user_serialize( self, - user_id, + user_service_deactivate_user_request, _request_auth, _content_type, _headers, @@ -2059,12 +1991,12 @@ def _user_service_deactivate_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_deactivate_user_request is not None: + _body_params = user_service_deactivate_user_request # set the HTTP header `Accept` @@ -2096,7 +2028,7 @@ def _user_service_deactivate_user_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/deactivate', + resource_path='/zitadel.user.v2.UserService/DeactivateUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2113,9 +2045,9 @@ def _user_service_deactivate_user_serialize( @validate_call - def user_service_delete_user( + def delete_user( self, - user_id: StrictStr, + user_service_delete_user_request: UserServiceDeleteUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2129,12 +2061,12 @@ def user_service_delete_user( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceDeleteUserResponse: - """Delete user + """DeleteUser - 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.. + 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.. - :param user_id: (required) - :type user_id: str + :param user_service_delete_user_request: (required) + :type user_service_delete_user_request: UserServiceDeleteUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2157,8 +2089,8 @@ def user_service_delete_user( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_delete_user_serialize( - user_id=user_id, + _param = self._delete_user_serialize( + user_service_delete_user_request=user_service_delete_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2167,8 +2099,6 @@ def user_service_delete_user( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceDeleteUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2182,9 +2112,9 @@ def user_service_delete_user( @validate_call - def user_service_delete_user_with_http_info( + def delete_user_with_http_info( self, - user_id: StrictStr, + user_service_delete_user_request: UserServiceDeleteUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2198,12 +2128,12 @@ def user_service_delete_user_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceDeleteUserResponse]: - """Delete user + """DeleteUser - 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.. + 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.. - :param user_id: (required) - :type user_id: str + :param user_service_delete_user_request: (required) + :type user_service_delete_user_request: UserServiceDeleteUserRequest :param _request_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 +2156,8 @@ def user_service_delete_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_delete_user_serialize( - user_id=user_id, + _param = self._delete_user_serialize( + user_service_delete_user_request=user_service_delete_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2236,8 +2166,6 @@ def user_service_delete_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceDeleteUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2251,9 +2179,9 @@ def user_service_delete_user_with_http_info( @validate_call - def user_service_delete_user_without_preload_content( + def delete_user_without_preload_content( self, - user_id: StrictStr, + user_service_delete_user_request: UserServiceDeleteUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2267,12 +2195,12 @@ def user_service_delete_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete user + """DeleteUser - 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.. + 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.. - :param user_id: (required) - :type user_id: str + :param user_service_delete_user_request: (required) + :type user_service_delete_user_request: UserServiceDeleteUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2295,8 +2223,8 @@ def user_service_delete_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_delete_user_serialize( - user_id=user_id, + _param = self._delete_user_serialize( + user_service_delete_user_request=user_service_delete_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2305,8 +2233,6 @@ def user_service_delete_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceDeleteUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2315,9 +2241,9 @@ def user_service_delete_user_without_preload_content( return response_data.response - def _user_service_delete_user_serialize( + def _delete_user_serialize( self, - user_id, + user_service_delete_user_request, _request_auth, _content_type, _headers, @@ -2339,12 +2265,12 @@ def _user_service_delete_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_delete_user_request is not None: + _body_params = user_service_delete_user_request # set the HTTP header `Accept` @@ -2355,6 +2281,19 @@ def _user_service_delete_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] = [ @@ -2362,8 +2301,8 @@ def _user_service_delete_user_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}', + method='POST', + resource_path='/zitadel.user.v2.UserService/DeleteUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2380,9 +2319,9 @@ def _user_service_delete_user_serialize( @validate_call - def user_service_get_user_by_id( + def get_user_by_id( self, - user_id: Annotated[StrictStr, Field(description="User ID of the user you like to get.")], + user_service_get_user_by_id_request: UserServiceGetUserByIDRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2396,12 +2335,12 @@ def user_service_get_user_by_id( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceGetUserByIDResponse: - """User by ID + """GetUserByID - Returns the full user object (human or machine) including the profile, email, etc.. + User by ID Returns the full user object (human or machine) including the profile, email, etc.. - :param user_id: User ID of the user you like to get. (required) - :type user_id: str + :param user_service_get_user_by_id_request: (required) + :type user_service_get_user_by_id_request: UserServiceGetUserByIDRequest :param _request_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 +2363,8 @@ def user_service_get_user_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_get_user_by_id_serialize( - user_id=user_id, + _param = self._get_user_by_id_serialize( + user_service_get_user_by_id_request=user_service_get_user_by_id_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2434,8 +2373,6 @@ def user_service_get_user_by_id( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceGetUserByIDResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2449,9 +2386,9 @@ def user_service_get_user_by_id( @validate_call - def user_service_get_user_by_id_with_http_info( + def get_user_by_id_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="User ID of the user you like to get.")], + user_service_get_user_by_id_request: UserServiceGetUserByIDRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2465,12 +2402,12 @@ def user_service_get_user_by_id_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceGetUserByIDResponse]: - """User by ID + """GetUserByID - Returns the full user object (human or machine) including the profile, email, etc.. + User by ID Returns the full user object (human or machine) including the profile, email, etc.. - :param user_id: User ID of the user you like to get. (required) - :type user_id: str + :param user_service_get_user_by_id_request: (required) + :type user_service_get_user_by_id_request: UserServiceGetUserByIDRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2493,8 +2430,8 @@ def user_service_get_user_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_get_user_by_id_serialize( - user_id=user_id, + _param = self._get_user_by_id_serialize( + user_service_get_user_by_id_request=user_service_get_user_by_id_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2503,8 +2440,6 @@ def user_service_get_user_by_id_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceGetUserByIDResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2518,9 +2453,9 @@ def user_service_get_user_by_id_with_http_info( @validate_call - def user_service_get_user_by_id_without_preload_content( + def get_user_by_id_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="User ID of the user you like to get.")], + user_service_get_user_by_id_request: UserServiceGetUserByIDRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2534,12 +2469,12 @@ def user_service_get_user_by_id_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """User by ID + """GetUserByID - Returns the full user object (human or machine) including the profile, email, etc.. + User by ID Returns the full user object (human or machine) including the profile, email, etc.. - :param user_id: User ID of the user you like to get. (required) - :type user_id: str + :param user_service_get_user_by_id_request: (required) + :type user_service_get_user_by_id_request: UserServiceGetUserByIDRequest :param _request_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 +2497,8 @@ 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( - user_id=user_id, + _param = self._get_user_by_id_serialize( + user_service_get_user_by_id_request=user_service_get_user_by_id_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2572,8 +2507,6 @@ def user_service_get_user_by_id_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceGetUserByIDResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2582,9 +2515,9 @@ def user_service_get_user_by_id_without_preload_content( return response_data.response - def _user_service_get_user_by_id_serialize( + def _get_user_by_id_serialize( self, - user_id, + user_service_get_user_by_id_request, _request_auth, _content_type, _headers, @@ -2606,12 +2539,12 @@ def _user_service_get_user_by_id_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_get_user_by_id_request is not None: + _body_params = user_service_get_user_by_id_request # set the HTTP header `Accept` @@ -2622,6 +2555,19 @@ def _user_service_get_user_by_id_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] = [ @@ -2629,8 +2575,8 @@ def _user_service_get_user_by_id_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/users/{userId}', + method='POST', + resource_path='/zitadel.user.v2.UserService/GetUserByID', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2647,9 +2593,9 @@ def _user_service_get_user_by_id_serialize( @validate_call - def user_service_human_mfa_init_skipped( + def human_mfa_init_skipped( self, - user_id: StrictStr, + user_service_human_mfa_init_skipped_request: UserServiceHumanMFAInitSkippedRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2663,12 +2609,12 @@ def user_service_human_mfa_init_skipped( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceHumanMFAInitSkippedResponse: - """MFA Init Skipped + """HumanMFAInitSkipped - Update the last time the user has skipped MFA initialization. The server timestamp is used. + MFA Init Skipped 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_human_mfa_init_skipped_request: (required) + :type user_service_human_mfa_init_skipped_request: UserServiceHumanMFAInitSkippedRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2691,8 +2637,8 @@ def user_service_human_mfa_init_skipped( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_human_mfa_init_skipped_serialize( - user_id=user_id, + _param = self._human_mfa_init_skipped_serialize( + user_service_human_mfa_init_skipped_request=user_service_human_mfa_init_skipped_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2701,8 +2647,6 @@ def user_service_human_mfa_init_skipped( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceHumanMFAInitSkippedResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2716,9 +2660,9 @@ def user_service_human_mfa_init_skipped( @validate_call - def user_service_human_mfa_init_skipped_with_http_info( + def human_mfa_init_skipped_with_http_info( self, - user_id: StrictStr, + user_service_human_mfa_init_skipped_request: UserServiceHumanMFAInitSkippedRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2732,12 +2676,12 @@ def user_service_human_mfa_init_skipped_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceHumanMFAInitSkippedResponse]: - """MFA Init Skipped + """HumanMFAInitSkipped - Update the last time the user has skipped MFA initialization. The server timestamp is used. + MFA Init Skipped 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_human_mfa_init_skipped_request: (required) + :type user_service_human_mfa_init_skipped_request: UserServiceHumanMFAInitSkippedRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2760,8 +2704,8 @@ def user_service_human_mfa_init_skipped_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_human_mfa_init_skipped_serialize( - user_id=user_id, + _param = self._human_mfa_init_skipped_serialize( + user_service_human_mfa_init_skipped_request=user_service_human_mfa_init_skipped_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2770,8 +2714,6 @@ def user_service_human_mfa_init_skipped_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceHumanMFAInitSkippedResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2785,9 +2727,9 @@ def user_service_human_mfa_init_skipped_with_http_info( @validate_call - def user_service_human_mfa_init_skipped_without_preload_content( + def human_mfa_init_skipped_without_preload_content( self, - user_id: StrictStr, + user_service_human_mfa_init_skipped_request: UserServiceHumanMFAInitSkippedRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2801,12 +2743,12 @@ def user_service_human_mfa_init_skipped_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """MFA Init Skipped + """HumanMFAInitSkipped - Update the last time the user has skipped MFA initialization. The server timestamp is used. + MFA Init Skipped 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_human_mfa_init_skipped_request: (required) + :type user_service_human_mfa_init_skipped_request: UserServiceHumanMFAInitSkippedRequest :param _request_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,8 +2771,8 @@ 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( - user_id=user_id, + _param = self._human_mfa_init_skipped_serialize( + user_service_human_mfa_init_skipped_request=user_service_human_mfa_init_skipped_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2839,8 +2781,6 @@ def user_service_human_mfa_init_skipped_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceHumanMFAInitSkippedResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -2849,9 +2789,9 @@ def user_service_human_mfa_init_skipped_without_preload_content( return response_data.response - def _user_service_human_mfa_init_skipped_serialize( + def _human_mfa_init_skipped_serialize( self, - user_id, + user_service_human_mfa_init_skipped_request, _request_auth, _content_type, _headers, @@ -2873,12 +2813,12 @@ def _user_service_human_mfa_init_skipped_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_human_mfa_init_skipped_request is not None: + _body_params = user_service_human_mfa_init_skipped_request # set the HTTP header `Accept` @@ -2910,7 +2850,7 @@ def _user_service_human_mfa_init_skipped_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/mfa_init_skipped', + resource_path='/zitadel.user.v2.UserService/HumanMFAInitSkipped', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2927,11 +2867,9 @@ def _user_service_human_mfa_init_skipped_serialize( @validate_call - def user_service_list_authentication_factors( + def list_authentication_factors( 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, + user_service_list_authentication_factors_request: UserServiceListAuthenticationFactorsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2945,15 +2883,11 @@ def user_service_list_authentication_factors( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceListAuthenticationFactorsResponse: - """user_service_list_authentication_factors + """ListAuthenticationFactors - :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 user_service_list_authentication_factors_request: (required) + :type user_service_list_authentication_factors_request: UserServiceListAuthenticationFactorsRequest :param _request_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 +2910,8 @@ def user_service_list_authentication_factors( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_authentication_factors_serialize( - user_id=user_id, - auth_factors=auth_factors, - states=states, + _param = self._list_authentication_factors_serialize( + user_service_list_authentication_factors_request=user_service_list_authentication_factors_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2988,8 +2920,6 @@ def user_service_list_authentication_factors( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListAuthenticationFactorsResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3003,11 +2933,9 @@ def user_service_list_authentication_factors( @validate_call - def user_service_list_authentication_factors_with_http_info( + def list_authentication_factors_with_http_info( 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, + user_service_list_authentication_factors_request: UserServiceListAuthenticationFactorsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3021,15 +2949,11 @@ def user_service_list_authentication_factors_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceListAuthenticationFactorsResponse]: - """user_service_list_authentication_factors + """ListAuthenticationFactors - :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 user_service_list_authentication_factors_request: (required) + :type user_service_list_authentication_factors_request: UserServiceListAuthenticationFactorsRequest :param _request_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 +2976,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( - user_id=user_id, - auth_factors=auth_factors, - states=states, + _param = self._list_authentication_factors_serialize( + user_service_list_authentication_factors_request=user_service_list_authentication_factors_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3064,8 +2986,6 @@ def user_service_list_authentication_factors_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListAuthenticationFactorsResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3079,11 +2999,9 @@ def user_service_list_authentication_factors_with_http_info( @validate_call - def user_service_list_authentication_factors_without_preload_content( + def list_authentication_factors_without_preload_content( 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, + user_service_list_authentication_factors_request: UserServiceListAuthenticationFactorsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3097,15 +3015,11 @@ def user_service_list_authentication_factors_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """user_service_list_authentication_factors + """ListAuthenticationFactors - :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 user_service_list_authentication_factors_request: (required) + :type user_service_list_authentication_factors_request: UserServiceListAuthenticationFactorsRequest :param _request_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 +3042,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( - user_id=user_id, - auth_factors=auth_factors, - states=states, + _param = self._list_authentication_factors_serialize( + user_service_list_authentication_factors_request=user_service_list_authentication_factors_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3140,8 +3052,6 @@ def user_service_list_authentication_factors_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListAuthenticationFactorsResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3150,11 +3060,9 @@ def user_service_list_authentication_factors_without_preload_content( return response_data.response - def _user_service_list_authentication_factors_serialize( + def _list_authentication_factors_serialize( self, - user_id, - auth_factors, - states, + user_service_list_authentication_factors_request, _request_auth, _content_type, _headers, @@ -3164,8 +3072,6 @@ def _user_service_list_authentication_factors_serialize( _host = None _collection_formats: Dict[str, str] = { - 'authFactors': 'csv', - 'states': 'csv', } _path_params: Dict[str, str] = {} @@ -3178,20 +3084,12 @@ def _user_service_list_authentication_factors_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 - 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 + if user_service_list_authentication_factors_request is not None: + _body_params = user_service_list_authentication_factors_request # set the HTTP header `Accept` @@ -3202,6 +3100,19 @@ def _user_service_list_authentication_factors_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] = [ @@ -3210,7 +3121,7 @@ def _user_service_list_authentication_factors_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/authentication_factors/_search', + resource_path='/zitadel.user.v2.UserService/ListAuthenticationFactors', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3227,11 +3138,9 @@ def _user_service_list_authentication_factors_serialize( @validate_call - def user_service_list_authentication_method_types( + def list_authentication_method_types( 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, + user_service_list_authentication_method_types_request: UserServiceListAuthenticationMethodTypesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3245,16 +3154,12 @@ def user_service_list_authentication_method_types( _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 + """ListAuthenticationMethodTypes - List all possible authentication methods of a user like password, passwordless, (T)OTP and more.. + 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 user_service_list_authentication_method_types_request: (required) + :type user_service_list_authentication_method_types_request: UserServiceListAuthenticationMethodTypesRequest :param _request_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 +3182,8 @@ def user_service_list_authentication_method_types( :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, + _param = self._list_authentication_method_types_serialize( + user_service_list_authentication_method_types_request=user_service_list_authentication_method_types_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3289,8 +3192,6 @@ def user_service_list_authentication_method_types( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListAuthenticationMethodTypesResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3304,11 +3205,9 @@ def user_service_list_authentication_method_types( @validate_call - def user_service_list_authentication_method_types_with_http_info( + def 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, + user_service_list_authentication_method_types_request: UserServiceListAuthenticationMethodTypesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3322,16 +3221,12 @@ def user_service_list_authentication_method_types_with_http_info( _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 + """ListAuthenticationMethodTypes - List all possible authentication methods of a user like password, passwordless, (T)OTP and more.. + 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 user_service_list_authentication_method_types_request: (required) + :type user_service_list_authentication_method_types_request: UserServiceListAuthenticationMethodTypesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3354,10 +3249,8 @@ def user_service_list_authentication_method_types_with_http_info( :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, + _param = self._list_authentication_method_types_serialize( + user_service_list_authentication_method_types_request=user_service_list_authentication_method_types_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3366,8 +3259,6 @@ def user_service_list_authentication_method_types_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListAuthenticationMethodTypesResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3381,11 +3272,9 @@ def user_service_list_authentication_method_types_with_http_info( @validate_call - def user_service_list_authentication_method_types_without_preload_content( + def 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, + user_service_list_authentication_method_types_request: UserServiceListAuthenticationMethodTypesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3399,16 +3288,12 @@ def user_service_list_authentication_method_types_without_preload_content( _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 + """ListAuthenticationMethodTypes - List all possible authentication methods of a user like password, passwordless, (T)OTP and more.. + 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 user_service_list_authentication_method_types_request: (required) + :type user_service_list_authentication_method_types_request: UserServiceListAuthenticationMethodTypesRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3431,10 +3316,8 @@ def user_service_list_authentication_method_types_without_preload_content( :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, + _param = self._list_authentication_method_types_serialize( + user_service_list_authentication_method_types_request=user_service_list_authentication_method_types_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3443,8 +3326,6 @@ def user_service_list_authentication_method_types_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListAuthenticationMethodTypesResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3453,11 +3334,9 @@ def user_service_list_authentication_method_types_without_preload_content( return response_data.response - def _user_service_list_authentication_method_types_serialize( + def _list_authentication_method_types_serialize( self, - user_id, - domain_query_include_without_domain, - domain_query_domain, + user_service_list_authentication_method_types_request, _request_auth, _content_type, _headers, @@ -3479,20 +3358,12 @@ def _user_service_list_authentication_method_types_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 - 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_list_authentication_method_types_request is not None: + _body_params = user_service_list_authentication_method_types_request # set the HTTP header `Accept` @@ -3503,6 +3374,19 @@ def _user_service_list_authentication_method_types_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] = [ @@ -3510,8 +3394,8 @@ def _user_service_list_authentication_method_types_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/users/{userId}/authentication_methods', + method='POST', + resource_path='/zitadel.user.v2.UserService/ListAuthenticationMethodTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3528,9 +3412,8 @@ def _user_service_list_authentication_method_types_serialize( @validate_call - def user_service_list_idp_links( + def list_idp_links( self, - user_id: StrictStr, user_service_list_idp_links_request: UserServiceListIDPLinksRequest, _request_timeout: Union[ None, @@ -3545,12 +3428,10 @@ def user_service_list_idp_links( _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 + """ListIDPLinks - List links to an identity provider of an user. + 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 @@ -3575,8 +3456,7 @@ def user_service_list_idp_links( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_idp_links_serialize( - user_id=user_id, + _param = self._list_idp_links_serialize( user_service_list_idp_links_request=user_service_list_idp_links_request, _request_auth=_request_auth, _content_type=_content_type, @@ -3586,8 +3466,6 @@ def user_service_list_idp_links( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListIDPLinksResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3601,9 +3479,8 @@ def user_service_list_idp_links( @validate_call - def user_service_list_idp_links_with_http_info( + def list_idp_links_with_http_info( self, - user_id: StrictStr, user_service_list_idp_links_request: UserServiceListIDPLinksRequest, _request_timeout: Union[ None, @@ -3618,12 +3495,10 @@ def user_service_list_idp_links_with_http_info( _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 + """ListIDPLinks - List links to an identity provider of an user. + 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 @@ -3648,8 +3523,7 @@ def user_service_list_idp_links_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_idp_links_serialize( - user_id=user_id, + _param = self._list_idp_links_serialize( user_service_list_idp_links_request=user_service_list_idp_links_request, _request_auth=_request_auth, _content_type=_content_type, @@ -3659,8 +3533,6 @@ def user_service_list_idp_links_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListIDPLinksResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3674,9 +3546,8 @@ def user_service_list_idp_links_with_http_info( @validate_call - def user_service_list_idp_links_without_preload_content( + def list_idp_links_without_preload_content( self, - user_id: StrictStr, user_service_list_idp_links_request: UserServiceListIDPLinksRequest, _request_timeout: Union[ None, @@ -3691,12 +3562,10 @@ def user_service_list_idp_links_without_preload_content( _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 + """ListIDPLinks - List links to an identity provider of an user. + 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 @@ -3721,8 +3590,7 @@ def user_service_list_idp_links_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_idp_links_serialize( - user_id=user_id, + _param = self._list_idp_links_serialize( user_service_list_idp_links_request=user_service_list_idp_links_request, _request_auth=_request_auth, _content_type=_content_type, @@ -3732,8 +3600,6 @@ def user_service_list_idp_links_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListIDPLinksResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3742,9 +3608,8 @@ def user_service_list_idp_links_without_preload_content( return response_data.response - def _user_service_list_idp_links_serialize( + def _list_idp_links_serialize( self, - user_id, user_service_list_idp_links_request, _request_auth, _content_type, @@ -3767,8 +3632,6 @@ def _user_service_list_idp_links_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 @@ -3806,7 +3669,7 @@ def _user_service_list_idp_links_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/links/_search', + resource_path='/zitadel.user.v2.UserService/ListIDPLinks', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3823,9 +3686,9 @@ def _user_service_list_idp_links_serialize( @validate_call - def user_service_list_passkeys( + def list_passkeys( self, - user_id: StrictStr, + user_service_list_passkeys_request: UserServiceListPasskeysRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3839,12 +3702,12 @@ def user_service_list_passkeys( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceListPasskeysResponse: - """List passkeys of an user + """ListPasskeys - List passkeys of an user + List passkeys of an user List passkeys of an user - :param user_id: (required) - :type user_id: str + :param user_service_list_passkeys_request: (required) + :type user_service_list_passkeys_request: UserServiceListPasskeysRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3867,8 +3730,8 @@ def user_service_list_passkeys( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_passkeys_serialize( - user_id=user_id, + _param = self._list_passkeys_serialize( + user_service_list_passkeys_request=user_service_list_passkeys_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3877,8 +3740,6 @@ def user_service_list_passkeys( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListPasskeysResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3892,9 +3753,9 @@ def user_service_list_passkeys( @validate_call - def user_service_list_passkeys_with_http_info( + def list_passkeys_with_http_info( self, - user_id: StrictStr, + user_service_list_passkeys_request: UserServiceListPasskeysRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3908,12 +3769,12 @@ def user_service_list_passkeys_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceListPasskeysResponse]: - """List passkeys of an user + """ListPasskeys - List passkeys of an user + List passkeys of an user List passkeys of an user - :param user_id: (required) - :type user_id: str + :param user_service_list_passkeys_request: (required) + :type user_service_list_passkeys_request: UserServiceListPasskeysRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3936,8 +3797,8 @@ def user_service_list_passkeys_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_passkeys_serialize( - user_id=user_id, + _param = self._list_passkeys_serialize( + user_service_list_passkeys_request=user_service_list_passkeys_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3946,8 +3807,6 @@ def user_service_list_passkeys_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListPasskeysResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -3961,9 +3820,9 @@ def user_service_list_passkeys_with_http_info( @validate_call - def user_service_list_passkeys_without_preload_content( + def list_passkeys_without_preload_content( self, - user_id: StrictStr, + user_service_list_passkeys_request: UserServiceListPasskeysRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3977,12 +3836,12 @@ def user_service_list_passkeys_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List passkeys of an user + """ListPasskeys - List passkeys of an user + List passkeys of an user List passkeys of an user - :param user_id: (required) - :type user_id: str + :param user_service_list_passkeys_request: (required) + :type user_service_list_passkeys_request: UserServiceListPasskeysRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4005,8 +3864,8 @@ def user_service_list_passkeys_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_passkeys_serialize( - user_id=user_id, + _param = self._list_passkeys_serialize( + user_service_list_passkeys_request=user_service_list_passkeys_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4015,8 +3874,6 @@ def user_service_list_passkeys_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListPasskeysResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -4025,9 +3882,9 @@ def user_service_list_passkeys_without_preload_content( return response_data.response - def _user_service_list_passkeys_serialize( + def _list_passkeys_serialize( self, - user_id, + user_service_list_passkeys_request, _request_auth, _content_type, _headers, @@ -4049,12 +3906,12 @@ def _user_service_list_passkeys_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_list_passkeys_request is not None: + _body_params = user_service_list_passkeys_request # set the HTTP header `Accept` @@ -4086,7 +3943,7 @@ def _user_service_list_passkeys_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/passkeys/_search', + resource_path='/zitadel.user.v2.UserService/ListPasskeys', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4103,7 +3960,7 @@ def _user_service_list_passkeys_serialize( @validate_call - def user_service_list_users( + def list_users( self, user_service_list_users_request: UserServiceListUsersRequest, _request_timeout: Union[ @@ -4119,9 +3976,9 @@ def user_service_list_users( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceListUsersResponse: - """Search Users + """ListUsers - 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. + 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 @@ -4147,7 +4004,7 @@ def user_service_list_users( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_users_serialize( + _param = self._list_users_serialize( user_service_list_users_request=user_service_list_users_request, _request_auth=_request_auth, _content_type=_content_type, @@ -4157,9 +4014,6 @@ def user_service_list_users( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListUsersResponse", - '400': "UserServiceRpcStatus", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -4173,7 +4027,7 @@ def user_service_list_users( @validate_call - def user_service_list_users_with_http_info( + def list_users_with_http_info( self, user_service_list_users_request: UserServiceListUsersRequest, _request_timeout: Union[ @@ -4189,9 +4043,9 @@ def user_service_list_users_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceListUsersResponse]: - """Search Users + """ListUsers - 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. + 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 @@ -4217,7 +4071,7 @@ def user_service_list_users_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_users_serialize( + _param = self._list_users_serialize( user_service_list_users_request=user_service_list_users_request, _request_auth=_request_auth, _content_type=_content_type, @@ -4227,9 +4081,6 @@ def user_service_list_users_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListUsersResponse", - '400': "UserServiceRpcStatus", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -4243,7 +4094,7 @@ def user_service_list_users_with_http_info( @validate_call - def user_service_list_users_without_preload_content( + def list_users_without_preload_content( self, user_service_list_users_request: UserServiceListUsersRequest, _request_timeout: Union[ @@ -4259,9 +4110,9 @@ def user_service_list_users_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Search Users + """ListUsers - 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. + 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 @@ -4287,7 +4138,7 @@ def user_service_list_users_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_users_serialize( + _param = self._list_users_serialize( user_service_list_users_request=user_service_list_users_request, _request_auth=_request_auth, _content_type=_content_type, @@ -4297,9 +4148,6 @@ def user_service_list_users_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceListUsersResponse", - '400': "UserServiceRpcStatus", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -4308,7 +4156,7 @@ def user_service_list_users_without_preload_content( return response_data.response - def _user_service_list_users_serialize( + def _list_users_serialize( self, user_service_list_users_request, _request_auth, @@ -4369,7 +4217,7 @@ def _user_service_list_users_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users', + resource_path='/zitadel.user.v2.UserService/ListUsers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4386,9 +4234,9 @@ def _user_service_list_users_serialize( @validate_call - def user_service_lock_user( + def lock_user( self, - user_id: StrictStr, + user_service_lock_user_request: UserServiceLockUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4402,12 +4250,12 @@ def user_service_lock_user( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceLockUserResponse: - """Lock user + """LockUser - 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.).. + 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 user_service_lock_user_request: (required) + :type user_service_lock_user_request: UserServiceLockUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4430,8 +4278,8 @@ def user_service_lock_user( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_lock_user_serialize( - user_id=user_id, + _param = self._lock_user_serialize( + user_service_lock_user_request=user_service_lock_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4440,8 +4288,6 @@ def user_service_lock_user( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceLockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -4455,9 +4301,9 @@ def user_service_lock_user( @validate_call - def user_service_lock_user_with_http_info( + def lock_user_with_http_info( self, - user_id: StrictStr, + user_service_lock_user_request: UserServiceLockUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4471,12 +4317,12 @@ def user_service_lock_user_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceLockUserResponse]: - """Lock user + """LockUser - 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.).. + 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 user_service_lock_user_request: (required) + :type user_service_lock_user_request: UserServiceLockUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4499,8 +4345,8 @@ def user_service_lock_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_lock_user_serialize( - user_id=user_id, + _param = self._lock_user_serialize( + user_service_lock_user_request=user_service_lock_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4509,8 +4355,6 @@ def user_service_lock_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceLockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -4524,9 +4368,9 @@ def user_service_lock_user_with_http_info( @validate_call - def user_service_lock_user_without_preload_content( + def lock_user_without_preload_content( self, - user_id: StrictStr, + user_service_lock_user_request: UserServiceLockUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4540,12 +4384,12 @@ def user_service_lock_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Lock user + """LockUser - 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.).. + 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 user_service_lock_user_request: (required) + :type user_service_lock_user_request: UserServiceLockUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4568,8 +4412,8 @@ def user_service_lock_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_lock_user_serialize( - user_id=user_id, + _param = self._lock_user_serialize( + user_service_lock_user_request=user_service_lock_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4578,8 +4422,6 @@ def user_service_lock_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceLockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -4588,9 +4430,9 @@ def user_service_lock_user_without_preload_content( return response_data.response - def _user_service_lock_user_serialize( + def _lock_user_serialize( self, - user_id, + user_service_lock_user_request, _request_auth, _content_type, _headers, @@ -4612,12 +4454,12 @@ def _user_service_lock_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_lock_user_request is not None: + _body_params = user_service_lock_user_request # set the HTTP header `Accept` @@ -4649,7 +4491,7 @@ def _user_service_lock_user_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/lock', + resource_path='/zitadel.user.v2.UserService/LockUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4666,9 +4508,251 @@ def _user_service_lock_user_serialize( @validate_call - def user_service_password_reset( + def no_op( + 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, + ) -> NoOp200Response4: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response4", + } + 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 no_op_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[NoOp200Response4]: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response4", + } + 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 no_op_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: + """Dummy endpoint to retain union-member schemas + + + :param _request_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._no_op_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NoOp200Response4", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _no_op_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='/df395562', + 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 password_reset( self, - user_id: StrictStr, user_service_password_reset_request: UserServicePasswordResetRequest, _request_timeout: Union[ None, @@ -4683,12 +4767,10 @@ def user_service_password_reset( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServicePasswordResetResponse: - """Request a code to reset a password + """PasswordReset - Request a code to reset a password.. + 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 @@ -4713,8 +4795,7 @@ def user_service_password_reset( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_password_reset_serialize( - user_id=user_id, + _param = self._password_reset_serialize( user_service_password_reset_request=user_service_password_reset_request, _request_auth=_request_auth, _content_type=_content_type, @@ -4724,8 +4805,6 @@ def user_service_password_reset( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServicePasswordResetResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -4739,9 +4818,8 @@ def user_service_password_reset( @validate_call - def user_service_password_reset_with_http_info( + def password_reset_with_http_info( self, - user_id: StrictStr, user_service_password_reset_request: UserServicePasswordResetRequest, _request_timeout: Union[ None, @@ -4756,12 +4834,10 @@ def user_service_password_reset_with_http_info( _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 + """PasswordReset - Request a code to reset a password.. + 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 @@ -4786,8 +4862,7 @@ def user_service_password_reset_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_password_reset_serialize( - user_id=user_id, + _param = self._password_reset_serialize( user_service_password_reset_request=user_service_password_reset_request, _request_auth=_request_auth, _content_type=_content_type, @@ -4797,8 +4872,6 @@ def user_service_password_reset_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServicePasswordResetResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -4812,9 +4885,8 @@ def user_service_password_reset_with_http_info( @validate_call - def user_service_password_reset_without_preload_content( + def password_reset_without_preload_content( self, - user_id: StrictStr, user_service_password_reset_request: UserServicePasswordResetRequest, _request_timeout: Union[ None, @@ -4829,12 +4901,10 @@ def user_service_password_reset_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Request a code to reset a password + """PasswordReset - Request a code to reset a password.. + 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 @@ -4859,8 +4929,7 @@ def user_service_password_reset_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_password_reset_serialize( - user_id=user_id, + _param = self._password_reset_serialize( user_service_password_reset_request=user_service_password_reset_request, _request_auth=_request_auth, _content_type=_content_type, @@ -4870,8 +4939,6 @@ def user_service_password_reset_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServicePasswordResetResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -4880,9 +4947,8 @@ def user_service_password_reset_without_preload_content( return response_data.response - def _user_service_password_reset_serialize( + def _password_reset_serialize( self, - user_id, user_service_password_reset_request, _request_auth, _content_type, @@ -4905,8 +4971,6 @@ def _user_service_password_reset_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 @@ -4944,7 +5008,7 @@ def _user_service_password_reset_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/password_reset', + resource_path='/zitadel.user.v2.UserService/PasswordReset', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4961,9 +5025,9 @@ def _user_service_password_reset_serialize( @validate_call - def user_service_reactivate_user( + def reactivate_user( self, - user_id: StrictStr, + user_service_reactivate_user_request: UserServiceReactivateUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4977,12 +5041,12 @@ def user_service_reactivate_user( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceReactivateUserResponse: - """Reactivate user + """ReactivateUser - 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'.. + 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 user_service_reactivate_user_request: (required) + :type user_service_reactivate_user_request: UserServiceReactivateUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5005,8 +5069,8 @@ def user_service_reactivate_user( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_reactivate_user_serialize( - user_id=user_id, + _param = self._reactivate_user_serialize( + user_service_reactivate_user_request=user_service_reactivate_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5015,8 +5079,6 @@ def user_service_reactivate_user( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceReactivateUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -5030,9 +5092,9 @@ def user_service_reactivate_user( @validate_call - def user_service_reactivate_user_with_http_info( + def reactivate_user_with_http_info( self, - user_id: StrictStr, + user_service_reactivate_user_request: UserServiceReactivateUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5046,12 +5108,12 @@ def user_service_reactivate_user_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceReactivateUserResponse]: - """Reactivate user + """ReactivateUser - 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'.. + 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 user_service_reactivate_user_request: (required) + :type user_service_reactivate_user_request: UserServiceReactivateUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5074,8 +5136,8 @@ def user_service_reactivate_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_reactivate_user_serialize( - user_id=user_id, + _param = self._reactivate_user_serialize( + user_service_reactivate_user_request=user_service_reactivate_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5084,8 +5146,6 @@ def user_service_reactivate_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceReactivateUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -5099,9 +5159,9 @@ def user_service_reactivate_user_with_http_info( @validate_call - def user_service_reactivate_user_without_preload_content( + def reactivate_user_without_preload_content( self, - user_id: StrictStr, + user_service_reactivate_user_request: UserServiceReactivateUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5115,12 +5175,12 @@ def user_service_reactivate_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Reactivate user + """ReactivateUser - 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'.. + 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 user_service_reactivate_user_request: (required) + :type user_service_reactivate_user_request: UserServiceReactivateUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5143,8 +5203,8 @@ def user_service_reactivate_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_reactivate_user_serialize( - user_id=user_id, + _param = self._reactivate_user_serialize( + user_service_reactivate_user_request=user_service_reactivate_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5153,8 +5213,6 @@ def user_service_reactivate_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceReactivateUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -5163,9 +5221,9 @@ def user_service_reactivate_user_without_preload_content( return response_data.response - def _user_service_reactivate_user_serialize( + def _reactivate_user_serialize( self, - user_id, + user_service_reactivate_user_request, _request_auth, _content_type, _headers, @@ -5187,12 +5245,12 @@ def _user_service_reactivate_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_reactivate_user_request is not None: + _body_params = user_service_reactivate_user_request # set the HTTP header `Accept` @@ -5224,7 +5282,7 @@ def _user_service_reactivate_user_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/reactivate', + resource_path='/zitadel.user.v2.UserService/ReactivateUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5241,9 +5299,8 @@ def _user_service_reactivate_user_serialize( @validate_call - def user_service_register_passkey( + def register_passkey( self, - user_id: StrictStr, user_service_register_passkey_request: UserServiceRegisterPasskeyRequest, _request_timeout: Union[ None, @@ -5258,12 +5315,10 @@ def user_service_register_passkey( _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 + """RegisterPasskey - 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.. + 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 @@ -5288,8 +5343,7 @@ def user_service_register_passkey( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_register_passkey_serialize( - user_id=user_id, + _param = self._register_passkey_serialize( user_service_register_passkey_request=user_service_register_passkey_request, _request_auth=_request_auth, _content_type=_content_type, @@ -5299,8 +5353,6 @@ def user_service_register_passkey( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRegisterPasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -5314,9 +5366,8 @@ def user_service_register_passkey( @validate_call - def user_service_register_passkey_with_http_info( + def register_passkey_with_http_info( self, - user_id: StrictStr, user_service_register_passkey_request: UserServiceRegisterPasskeyRequest, _request_timeout: Union[ None, @@ -5331,12 +5382,10 @@ def user_service_register_passkey_with_http_info( _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 + """RegisterPasskey - 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.. + 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 @@ -5361,8 +5410,7 @@ def user_service_register_passkey_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_register_passkey_serialize( - user_id=user_id, + _param = self._register_passkey_serialize( user_service_register_passkey_request=user_service_register_passkey_request, _request_auth=_request_auth, _content_type=_content_type, @@ -5372,8 +5420,6 @@ def user_service_register_passkey_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRegisterPasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -5387,9 +5433,8 @@ def user_service_register_passkey_with_http_info( @validate_call - def user_service_register_passkey_without_preload_content( + def register_passkey_without_preload_content( self, - user_id: StrictStr, user_service_register_passkey_request: UserServiceRegisterPasskeyRequest, _request_timeout: Union[ None, @@ -5404,12 +5449,10 @@ def user_service_register_passkey_without_preload_content( _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 + """RegisterPasskey - 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.. + 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 @@ -5434,8 +5477,7 @@ def user_service_register_passkey_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_register_passkey_serialize( - user_id=user_id, + _param = self._register_passkey_serialize( user_service_register_passkey_request=user_service_register_passkey_request, _request_auth=_request_auth, _content_type=_content_type, @@ -5445,8 +5487,6 @@ def user_service_register_passkey_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRegisterPasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -5455,9 +5495,8 @@ def user_service_register_passkey_without_preload_content( return response_data.response - def _user_service_register_passkey_serialize( + def _register_passkey_serialize( self, - user_id, user_service_register_passkey_request, _request_auth, _content_type, @@ -5480,8 +5519,6 @@ def _user_service_register_passkey_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 @@ -5519,7 +5556,7 @@ def _user_service_register_passkey_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/passkeys', + resource_path='/zitadel.user.v2.UserService/RegisterPasskey', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5536,9 +5573,9 @@ def _user_service_register_passkey_serialize( @validate_call - def user_service_register_totp( + def register_totp( self, - user_id: StrictStr, + user_service_register_totp_request: UserServiceRegisterTOTPRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5552,12 +5589,12 @@ def user_service_register_totp( _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 + """RegisterTOTP - 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.. + 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 user_service_register_totp_request: (required) + :type user_service_register_totp_request: UserServiceRegisterTOTPRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5580,8 +5617,8 @@ def user_service_register_totp( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_register_totp_serialize( - user_id=user_id, + _param = self._register_totp_serialize( + user_service_register_totp_request=user_service_register_totp_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5590,8 +5627,6 @@ def user_service_register_totp( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRegisterTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -5605,9 +5640,9 @@ def user_service_register_totp( @validate_call - def user_service_register_totp_with_http_info( + def register_totp_with_http_info( self, - user_id: StrictStr, + user_service_register_totp_request: UserServiceRegisterTOTPRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5621,12 +5656,12 @@ def user_service_register_totp_with_http_info( _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 + """RegisterTOTP - 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.. + 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 user_service_register_totp_request: (required) + :type user_service_register_totp_request: UserServiceRegisterTOTPRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5649,8 +5684,8 @@ def user_service_register_totp_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_register_totp_serialize( - user_id=user_id, + _param = self._register_totp_serialize( + user_service_register_totp_request=user_service_register_totp_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5659,8 +5694,6 @@ def user_service_register_totp_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRegisterTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -5674,9 +5707,9 @@ def user_service_register_totp_with_http_info( @validate_call - def user_service_register_totp_without_preload_content( + def register_totp_without_preload_content( self, - user_id: StrictStr, + user_service_register_totp_request: UserServiceRegisterTOTPRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5690,12 +5723,12 @@ def user_service_register_totp_without_preload_content( _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 + """RegisterTOTP - 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.. + 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 user_service_register_totp_request: (required) + :type user_service_register_totp_request: UserServiceRegisterTOTPRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5718,8 +5751,8 @@ def user_service_register_totp_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_register_totp_serialize( - user_id=user_id, + _param = self._register_totp_serialize( + user_service_register_totp_request=user_service_register_totp_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5728,8 +5761,6 @@ def user_service_register_totp_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRegisterTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -5738,9 +5769,9 @@ def user_service_register_totp_without_preload_content( return response_data.response - def _user_service_register_totp_serialize( + def _register_totp_serialize( self, - user_id, + user_service_register_totp_request, _request_auth, _content_type, _headers, @@ -5762,12 +5793,12 @@ def _user_service_register_totp_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_register_totp_request is not None: + _body_params = user_service_register_totp_request # set the HTTP header `Accept` @@ -5799,7 +5830,7 @@ def _user_service_register_totp_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/totp', + resource_path='/zitadel.user.v2.UserService/RegisterTOTP', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5816,9 +5847,8 @@ def _user_service_register_totp_serialize( @validate_call - def user_service_register_u2_f( + def register_u2_f( self, - user_id: StrictStr, user_service_register_u2_f_request: UserServiceRegisterU2FRequest, _request_timeout: Union[ None, @@ -5833,12 +5863,10 @@ def user_service_register_u2_f( _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 + """RegisterU2F - 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.. + 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 @@ -5863,8 +5891,7 @@ def user_service_register_u2_f( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_register_u2_f_serialize( - user_id=user_id, + _param = self._register_u2_f_serialize( user_service_register_u2_f_request=user_service_register_u2_f_request, _request_auth=_request_auth, _content_type=_content_type, @@ -5874,8 +5901,6 @@ def user_service_register_u2_f( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRegisterU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -5889,9 +5914,8 @@ def user_service_register_u2_f( @validate_call - def user_service_register_u2_f_with_http_info( + def register_u2_f_with_http_info( self, - user_id: StrictStr, user_service_register_u2_f_request: UserServiceRegisterU2FRequest, _request_timeout: Union[ None, @@ -5906,12 +5930,10 @@ def user_service_register_u2_f_with_http_info( _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 + """RegisterU2F - 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.. + 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 @@ -5936,8 +5958,7 @@ def user_service_register_u2_f_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_register_u2_f_serialize( - user_id=user_id, + _param = self._register_u2_f_serialize( user_service_register_u2_f_request=user_service_register_u2_f_request, _request_auth=_request_auth, _content_type=_content_type, @@ -5947,8 +5968,6 @@ def user_service_register_u2_f_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRegisterU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -5962,9 +5981,8 @@ def user_service_register_u2_f_with_http_info( @validate_call - def user_service_register_u2_f_without_preload_content( + def register_u2_f_without_preload_content( self, - user_id: StrictStr, user_service_register_u2_f_request: UserServiceRegisterU2FRequest, _request_timeout: Union[ None, @@ -5979,12 +5997,10 @@ def user_service_register_u2_f_without_preload_content( _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 + """RegisterU2F - 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.. + 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 @@ -6009,8 +6025,7 @@ def user_service_register_u2_f_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_register_u2_f_serialize( - user_id=user_id, + _param = self._register_u2_f_serialize( user_service_register_u2_f_request=user_service_register_u2_f_request, _request_auth=_request_auth, _content_type=_content_type, @@ -6020,8 +6035,6 @@ def user_service_register_u2_f_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRegisterU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -6030,9 +6043,8 @@ def user_service_register_u2_f_without_preload_content( return response_data.response - def _user_service_register_u2_f_serialize( + def _register_u2_f_serialize( self, - user_id, user_service_register_u2_f_request, _request_auth, _content_type, @@ -6055,8 +6067,6 @@ def _user_service_register_u2_f_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 @@ -6094,7 +6104,7 @@ def _user_service_register_u2_f_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/u2f', + resource_path='/zitadel.user.v2.UserService/RegisterU2F', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6111,11 +6121,9 @@ def _user_service_register_u2_f_serialize( @validate_call - def user_service_remove_idp_link( + def remove_idp_link( self, - user_id: StrictStr, - idp_id: StrictStr, - linked_user_id: StrictStr, + user_service_remove_idp_link_request: UserServiceRemoveIDPLinkRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6129,16 +6137,12 @@ def user_service_remove_idp_link( _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 + """RemoveIDPLink - Remove link of an identity provider to an user. + 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 user_service_remove_idp_link_request: (required) + :type user_service_remove_idp_link_request: UserServiceRemoveIDPLinkRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6161,10 +6165,8 @@ def user_service_remove_idp_link( :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, + _param = self._remove_idp_link_serialize( + user_service_remove_idp_link_request=user_service_remove_idp_link_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6173,8 +6175,6 @@ def user_service_remove_idp_link( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveIDPLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -6188,11 +6188,9 @@ def user_service_remove_idp_link( @validate_call - def user_service_remove_idp_link_with_http_info( + def remove_idp_link_with_http_info( self, - user_id: StrictStr, - idp_id: StrictStr, - linked_user_id: StrictStr, + user_service_remove_idp_link_request: UserServiceRemoveIDPLinkRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6206,16 +6204,12 @@ def user_service_remove_idp_link_with_http_info( _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 + """RemoveIDPLink - Remove link of an identity provider to an user. + 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 user_service_remove_idp_link_request: (required) + :type user_service_remove_idp_link_request: UserServiceRemoveIDPLinkRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6238,10 +6232,8 @@ def user_service_remove_idp_link_with_http_info( :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, + _param = self._remove_idp_link_serialize( + user_service_remove_idp_link_request=user_service_remove_idp_link_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6250,8 +6242,6 @@ def user_service_remove_idp_link_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveIDPLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -6265,11 +6255,9 @@ def user_service_remove_idp_link_with_http_info( @validate_call - def user_service_remove_idp_link_without_preload_content( + def remove_idp_link_without_preload_content( self, - user_id: StrictStr, - idp_id: StrictStr, - linked_user_id: StrictStr, + user_service_remove_idp_link_request: UserServiceRemoveIDPLinkRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6283,16 +6271,12 @@ def user_service_remove_idp_link_without_preload_content( _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 + """RemoveIDPLink - Remove link of an identity provider to an user. + 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 user_service_remove_idp_link_request: (required) + :type user_service_remove_idp_link_request: UserServiceRemoveIDPLinkRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6315,10 +6299,8 @@ def user_service_remove_idp_link_without_preload_content( :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, + _param = self._remove_idp_link_serialize( + user_service_remove_idp_link_request=user_service_remove_idp_link_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6327,8 +6309,6 @@ def user_service_remove_idp_link_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveIDPLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -6337,11 +6317,9 @@ def user_service_remove_idp_link_without_preload_content( return response_data.response - def _user_service_remove_idp_link_serialize( + def _remove_idp_link_serialize( self, - user_id, - idp_id, - linked_user_id, + user_service_remove_idp_link_request, _request_auth, _content_type, _headers, @@ -6363,16 +6341,12 @@ def _user_service_remove_idp_link_serialize( _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 + if user_service_remove_idp_link_request is not None: + _body_params = user_service_remove_idp_link_request # set the HTTP header `Accept` @@ -6403,8 +6377,8 @@ def _user_service_remove_idp_link_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/links/{idpId}/{linkedUserId}', + method='POST', + resource_path='/zitadel.user.v2.UserService/RemoveIDPLink', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6421,9 +6395,9 @@ def _user_service_remove_idp_link_serialize( @validate_call - def user_service_remove_otp_email( + def remove_otp_email( self, - user_id: StrictStr, + user_service_remove_otp_email_request: UserServiceRemoveOTPEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6437,12 +6411,12 @@ def user_service_remove_otp_email( _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 + """RemoveOTPEmail - 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. + 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 user_service_remove_otp_email_request: (required) + :type user_service_remove_otp_email_request: UserServiceRemoveOTPEmailRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6465,8 +6439,8 @@ def user_service_remove_otp_email( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_otp_email_serialize( - user_id=user_id, + _param = self._remove_otp_email_serialize( + user_service_remove_otp_email_request=user_service_remove_otp_email_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6475,8 +6449,6 @@ def user_service_remove_otp_email( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveOTPEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -6490,9 +6462,9 @@ def user_service_remove_otp_email( @validate_call - def user_service_remove_otp_email_with_http_info( + def remove_otp_email_with_http_info( self, - user_id: StrictStr, + user_service_remove_otp_email_request: UserServiceRemoveOTPEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6506,12 +6478,12 @@ def user_service_remove_otp_email_with_http_info( _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 + """RemoveOTPEmail - 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. + 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 user_service_remove_otp_email_request: (required) + :type user_service_remove_otp_email_request: UserServiceRemoveOTPEmailRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6534,8 +6506,8 @@ def user_service_remove_otp_email_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_otp_email_serialize( - user_id=user_id, + _param = self._remove_otp_email_serialize( + user_service_remove_otp_email_request=user_service_remove_otp_email_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6544,8 +6516,6 @@ def user_service_remove_otp_email_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveOTPEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -6559,9 +6529,9 @@ def user_service_remove_otp_email_with_http_info( @validate_call - def user_service_remove_otp_email_without_preload_content( + def remove_otp_email_without_preload_content( self, - user_id: StrictStr, + user_service_remove_otp_email_request: UserServiceRemoveOTPEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6575,12 +6545,12 @@ def user_service_remove_otp_email_without_preload_content( _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 + """RemoveOTPEmail - 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. + 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 user_service_remove_otp_email_request: (required) + :type user_service_remove_otp_email_request: UserServiceRemoveOTPEmailRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6603,8 +6573,8 @@ def user_service_remove_otp_email_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_otp_email_serialize( - user_id=user_id, + _param = self._remove_otp_email_serialize( + user_service_remove_otp_email_request=user_service_remove_otp_email_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6613,8 +6583,6 @@ def user_service_remove_otp_email_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveOTPEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -6623,9 +6591,9 @@ def user_service_remove_otp_email_without_preload_content( return response_data.response - def _user_service_remove_otp_email_serialize( + def _remove_otp_email_serialize( self, - user_id, + user_service_remove_otp_email_request, _request_auth, _content_type, _headers, @@ -6647,12 +6615,12 @@ def _user_service_remove_otp_email_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_remove_otp_email_request is not None: + _body_params = user_service_remove_otp_email_request # set the HTTP header `Accept` @@ -6663,6 +6631,19 @@ def _user_service_remove_otp_email_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] = [ @@ -6670,8 +6651,8 @@ def _user_service_remove_otp_email_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/otp_email', + method='POST', + resource_path='/zitadel.user.v2.UserService/RemoveOTPEmail', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6688,9 +6669,9 @@ def _user_service_remove_otp_email_serialize( @validate_call - def user_service_remove_otpsms( + def remove_otpsms( self, - user_id: StrictStr, + user_service_remove_otpsms_request: UserServiceRemoveOTPSMSRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6704,12 +6685,12 @@ def user_service_remove_otpsms( _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 + """RemoveOTPSMS - 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. + 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 user_service_remove_otpsms_request: (required) + :type user_service_remove_otpsms_request: UserServiceRemoveOTPSMSRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6732,8 +6713,8 @@ def user_service_remove_otpsms( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_otpsms_serialize( - user_id=user_id, + _param = self._remove_otpsms_serialize( + user_service_remove_otpsms_request=user_service_remove_otpsms_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6742,8 +6723,6 @@ def user_service_remove_otpsms( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveOTPSMSResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -6757,9 +6736,9 @@ def user_service_remove_otpsms( @validate_call - def user_service_remove_otpsms_with_http_info( + def remove_otpsms_with_http_info( self, - user_id: StrictStr, + user_service_remove_otpsms_request: UserServiceRemoveOTPSMSRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6773,12 +6752,12 @@ def user_service_remove_otpsms_with_http_info( _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 + """RemoveOTPSMS - 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. + 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 user_service_remove_otpsms_request: (required) + :type user_service_remove_otpsms_request: UserServiceRemoveOTPSMSRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6801,8 +6780,8 @@ def user_service_remove_otpsms_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_otpsms_serialize( - user_id=user_id, + _param = self._remove_otpsms_serialize( + user_service_remove_otpsms_request=user_service_remove_otpsms_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6811,8 +6790,6 @@ def user_service_remove_otpsms_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveOTPSMSResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -6826,9 +6803,9 @@ def user_service_remove_otpsms_with_http_info( @validate_call - def user_service_remove_otpsms_without_preload_content( + def remove_otpsms_without_preload_content( self, - user_id: StrictStr, + user_service_remove_otpsms_request: UserServiceRemoveOTPSMSRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6842,12 +6819,12 @@ def user_service_remove_otpsms_without_preload_content( _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 + """RemoveOTPSMS - 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. + 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 user_service_remove_otpsms_request: (required) + :type user_service_remove_otpsms_request: UserServiceRemoveOTPSMSRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6870,8 +6847,8 @@ def user_service_remove_otpsms_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_otpsms_serialize( - user_id=user_id, + _param = self._remove_otpsms_serialize( + user_service_remove_otpsms_request=user_service_remove_otpsms_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6880,8 +6857,6 @@ def user_service_remove_otpsms_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveOTPSMSResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -6890,9 +6865,9 @@ def user_service_remove_otpsms_without_preload_content( return response_data.response - def _user_service_remove_otpsms_serialize( + def _remove_otpsms_serialize( self, - user_id, + user_service_remove_otpsms_request, _request_auth, _content_type, _headers, @@ -6914,12 +6889,12 @@ def _user_service_remove_otpsms_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_remove_otpsms_request is not None: + _body_params = user_service_remove_otpsms_request # set the HTTP header `Accept` @@ -6930,6 +6905,19 @@ def _user_service_remove_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] = [ @@ -6937,8 +6925,8 @@ def _user_service_remove_otpsms_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/otp_sms', + method='POST', + resource_path='/zitadel.user.v2.UserService/RemoveOTPSMS', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6955,10 +6943,9 @@ def _user_service_remove_otpsms_serialize( @validate_call - def user_service_remove_passkey( + def remove_passkey( self, - user_id: StrictStr, - passkey_id: StrictStr, + user_service_remove_passkey_request: UserServiceRemovePasskeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6972,14 +6959,12 @@ def user_service_remove_passkey( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemovePasskeyResponse: - """Remove passkey from a user + """RemovePasskey - Remove passkey from a user. + 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 user_service_remove_passkey_request: (required) + :type user_service_remove_passkey_request: UserServiceRemovePasskeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7002,9 +6987,8 @@ def user_service_remove_passkey( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_passkey_serialize( - user_id=user_id, - passkey_id=passkey_id, + _param = self._remove_passkey_serialize( + user_service_remove_passkey_request=user_service_remove_passkey_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7013,8 +6997,6 @@ def user_service_remove_passkey( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemovePasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -7028,10 +7010,9 @@ def user_service_remove_passkey( @validate_call - def user_service_remove_passkey_with_http_info( + def remove_passkey_with_http_info( self, - user_id: StrictStr, - passkey_id: StrictStr, + user_service_remove_passkey_request: UserServiceRemovePasskeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7045,14 +7026,12 @@ def user_service_remove_passkey_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceRemovePasskeyResponse]: - """Remove passkey from a user + """RemovePasskey - Remove passkey from a user. + 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 user_service_remove_passkey_request: (required) + :type user_service_remove_passkey_request: UserServiceRemovePasskeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7075,9 +7054,8 @@ def user_service_remove_passkey_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_passkey_serialize( - user_id=user_id, - passkey_id=passkey_id, + _param = self._remove_passkey_serialize( + user_service_remove_passkey_request=user_service_remove_passkey_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7086,8 +7064,6 @@ def user_service_remove_passkey_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemovePasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -7101,10 +7077,9 @@ def user_service_remove_passkey_with_http_info( @validate_call - def user_service_remove_passkey_without_preload_content( + def remove_passkey_without_preload_content( self, - user_id: StrictStr, - passkey_id: StrictStr, + user_service_remove_passkey_request: UserServiceRemovePasskeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7118,14 +7093,12 @@ def user_service_remove_passkey_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Remove passkey from a user + """RemovePasskey - Remove passkey from a user. + 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 user_service_remove_passkey_request: (required) + :type user_service_remove_passkey_request: UserServiceRemovePasskeyRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7148,9 +7121,8 @@ def user_service_remove_passkey_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_passkey_serialize( - user_id=user_id, - passkey_id=passkey_id, + _param = self._remove_passkey_serialize( + user_service_remove_passkey_request=user_service_remove_passkey_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7159,8 +7131,6 @@ def user_service_remove_passkey_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemovePasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -7169,10 +7139,9 @@ def user_service_remove_passkey_without_preload_content( return response_data.response - def _user_service_remove_passkey_serialize( + def _remove_passkey_serialize( self, - user_id, - passkey_id, + user_service_remove_passkey_request, _request_auth, _content_type, _headers, @@ -7194,14 +7163,12 @@ def _user_service_remove_passkey_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_remove_passkey_request is not None: + _body_params = user_service_remove_passkey_request # set the HTTP header `Accept` @@ -7212,6 +7179,19 @@ def _user_service_remove_passkey_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] = [ @@ -7219,8 +7199,8 @@ def _user_service_remove_passkey_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/passkeys/{passkeyId}', + method='POST', + resource_path='/zitadel.user.v2.UserService/RemovePasskey', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7237,9 +7217,9 @@ def _user_service_remove_passkey_serialize( @validate_call - def user_service_remove_phone( + def remove_phone( self, - user_id: StrictStr, + user_service_remove_phone_request: UserServiceRemovePhoneRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7253,12 +7233,12 @@ def user_service_remove_phone( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemovePhoneResponse: - """Delete the user phone + """RemovePhone - Delete the phone number of a user. + Remove the user phone Remove the user phone - :param user_id: (required) - :type user_id: str + :param user_service_remove_phone_request: (required) + :type user_service_remove_phone_request: UserServiceRemovePhoneRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7281,8 +7261,8 @@ def user_service_remove_phone( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_phone_serialize( - user_id=user_id, + _param = self._remove_phone_serialize( + user_service_remove_phone_request=user_service_remove_phone_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7291,8 +7271,6 @@ def user_service_remove_phone( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemovePhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -7306,9 +7284,9 @@ def user_service_remove_phone( @validate_call - def user_service_remove_phone_with_http_info( + def remove_phone_with_http_info( self, - user_id: StrictStr, + user_service_remove_phone_request: UserServiceRemovePhoneRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7322,12 +7300,12 @@ def user_service_remove_phone_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceRemovePhoneResponse]: - """Delete the user phone + """RemovePhone - Delete the phone number of a user. + Remove the user phone Remove the user phone - :param user_id: (required) - :type user_id: str + :param user_service_remove_phone_request: (required) + :type user_service_remove_phone_request: UserServiceRemovePhoneRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7350,8 +7328,8 @@ def user_service_remove_phone_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_phone_serialize( - user_id=user_id, + _param = self._remove_phone_serialize( + user_service_remove_phone_request=user_service_remove_phone_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7360,8 +7338,6 @@ def user_service_remove_phone_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemovePhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -7375,9 +7351,9 @@ def user_service_remove_phone_with_http_info( @validate_call - def user_service_remove_phone_without_preload_content( + def remove_phone_without_preload_content( self, - user_id: StrictStr, + user_service_remove_phone_request: UserServiceRemovePhoneRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7391,12 +7367,12 @@ def user_service_remove_phone_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete the user phone + """RemovePhone - Delete the phone number of a user. + Remove the user phone Remove the user phone - :param user_id: (required) - :type user_id: str + :param user_service_remove_phone_request: (required) + :type user_service_remove_phone_request: UserServiceRemovePhoneRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7419,8 +7395,8 @@ def user_service_remove_phone_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_phone_serialize( - user_id=user_id, + _param = self._remove_phone_serialize( + user_service_remove_phone_request=user_service_remove_phone_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7429,8 +7405,6 @@ def user_service_remove_phone_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemovePhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -7439,9 +7413,9 @@ def user_service_remove_phone_without_preload_content( return response_data.response - def _user_service_remove_phone_serialize( + def _remove_phone_serialize( self, - user_id, + user_service_remove_phone_request, _request_auth, _content_type, _headers, @@ -7463,12 +7437,12 @@ def _user_service_remove_phone_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_remove_phone_request is not None: + _body_params = user_service_remove_phone_request # set the HTTP header `Accept` @@ -7499,8 +7473,8 @@ def _user_service_remove_phone_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/phone', + method='POST', + resource_path='/zitadel.user.v2.UserService/RemovePhone', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7517,9 +7491,9 @@ def _user_service_remove_phone_serialize( @validate_call - def user_service_remove_totp( + def remove_totp( self, - user_id: StrictStr, + user_service_remove_totp_request: UserServiceRemoveTOTPRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7533,12 +7507,12 @@ def user_service_remove_totp( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemoveTOTPResponse: - """Remove TOTP generator from a user + """RemoveTOTP - 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. + 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 user_service_remove_totp_request: (required) + :type user_service_remove_totp_request: UserServiceRemoveTOTPRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7561,8 +7535,8 @@ def user_service_remove_totp( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_totp_serialize( - user_id=user_id, + _param = self._remove_totp_serialize( + user_service_remove_totp_request=user_service_remove_totp_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7571,8 +7545,6 @@ def user_service_remove_totp( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -7586,9 +7558,9 @@ def user_service_remove_totp( @validate_call - def user_service_remove_totp_with_http_info( + def remove_totp_with_http_info( self, - user_id: StrictStr, + user_service_remove_totp_request: UserServiceRemoveTOTPRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7602,12 +7574,12 @@ def user_service_remove_totp_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceRemoveTOTPResponse]: - """Remove TOTP generator from a user + """RemoveTOTP - 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. + 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 user_service_remove_totp_request: (required) + :type user_service_remove_totp_request: UserServiceRemoveTOTPRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7630,8 +7602,8 @@ def user_service_remove_totp_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_totp_serialize( - user_id=user_id, + _param = self._remove_totp_serialize( + user_service_remove_totp_request=user_service_remove_totp_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7640,8 +7612,6 @@ def user_service_remove_totp_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -7655,9 +7625,9 @@ def user_service_remove_totp_with_http_info( @validate_call - def user_service_remove_totp_without_preload_content( + def remove_totp_without_preload_content( self, - user_id: StrictStr, + user_service_remove_totp_request: UserServiceRemoveTOTPRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7671,12 +7641,12 @@ def user_service_remove_totp_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Remove TOTP generator from a user + """RemoveTOTP - 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. + 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 user_service_remove_totp_request: (required) + :type user_service_remove_totp_request: UserServiceRemoveTOTPRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7699,8 +7669,8 @@ def user_service_remove_totp_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_totp_serialize( - user_id=user_id, + _param = self._remove_totp_serialize( + user_service_remove_totp_request=user_service_remove_totp_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7709,8 +7679,6 @@ def user_service_remove_totp_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -7719,9 +7687,9 @@ def user_service_remove_totp_without_preload_content( return response_data.response - def _user_service_remove_totp_serialize( + def _remove_totp_serialize( self, - user_id, + user_service_remove_totp_request, _request_auth, _content_type, _headers, @@ -7743,12 +7711,12 @@ def _user_service_remove_totp_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_remove_totp_request is not None: + _body_params = user_service_remove_totp_request # set the HTTP header `Accept` @@ -7759,6 +7727,19 @@ def _user_service_remove_totp_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] = [ @@ -7766,8 +7747,8 @@ def _user_service_remove_totp_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/totp', + method='POST', + resource_path='/zitadel.user.v2.UserService/RemoveTOTP', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7784,10 +7765,9 @@ def _user_service_remove_totp_serialize( @validate_call - def user_service_remove_u2_f( + def remove_u2_f( self, - user_id: StrictStr, - u2f_id: StrictStr, + user_service_remove_u2_f_request: UserServiceRemoveU2FRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7801,14 +7781,12 @@ def user_service_remove_u2_f( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemoveU2FResponse: - """Remove u2f token from a user + """RemoveU2F - Remove u2f token from a user + 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 user_service_remove_u2_f_request: (required) + :type user_service_remove_u2_f_request: UserServiceRemoveU2FRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7831,9 +7809,8 @@ def user_service_remove_u2_f( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_u2_f_serialize( - user_id=user_id, - u2f_id=u2f_id, + _param = self._remove_u2_f_serialize( + user_service_remove_u2_f_request=user_service_remove_u2_f_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7842,8 +7819,6 @@ def user_service_remove_u2_f( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -7857,10 +7832,9 @@ def user_service_remove_u2_f( @validate_call - def user_service_remove_u2_f_with_http_info( + def remove_u2_f_with_http_info( self, - user_id: StrictStr, - u2f_id: StrictStr, + user_service_remove_u2_f_request: UserServiceRemoveU2FRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7874,14 +7848,12 @@ def user_service_remove_u2_f_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceRemoveU2FResponse]: - """Remove u2f token from a user + """RemoveU2F - Remove u2f token from a user + 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 user_service_remove_u2_f_request: (required) + :type user_service_remove_u2_f_request: UserServiceRemoveU2FRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7904,9 +7876,8 @@ def user_service_remove_u2_f_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_u2_f_serialize( - user_id=user_id, - u2f_id=u2f_id, + _param = self._remove_u2_f_serialize( + user_service_remove_u2_f_request=user_service_remove_u2_f_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7915,8 +7886,6 @@ def user_service_remove_u2_f_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -7930,10 +7899,9 @@ def user_service_remove_u2_f_with_http_info( @validate_call - def user_service_remove_u2_f_without_preload_content( + def remove_u2_f_without_preload_content( self, - user_id: StrictStr, - u2f_id: StrictStr, + user_service_remove_u2_f_request: UserServiceRemoveU2FRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7947,14 +7915,12 @@ def user_service_remove_u2_f_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Remove u2f token from a user + """RemoveU2F - Remove u2f token from a user + 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 user_service_remove_u2_f_request: (required) + :type user_service_remove_u2_f_request: UserServiceRemoveU2FRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7977,9 +7943,8 @@ def user_service_remove_u2_f_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_remove_u2_f_serialize( - user_id=user_id, - u2f_id=u2f_id, + _param = self._remove_u2_f_serialize( + user_service_remove_u2_f_request=user_service_remove_u2_f_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7988,8 +7953,6 @@ def user_service_remove_u2_f_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRemoveU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -7998,10 +7961,9 @@ def user_service_remove_u2_f_without_preload_content( return response_data.response - def _user_service_remove_u2_f_serialize( + def _remove_u2_f_serialize( self, - user_id, - u2f_id, + user_service_remove_u2_f_request, _request_auth, _content_type, _headers, @@ -8023,14 +7985,12 @@ def _user_service_remove_u2_f_serialize( _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 + if user_service_remove_u2_f_request is not None: + _body_params = user_service_remove_u2_f_request # set the HTTP header `Accept` @@ -8041,6 +8001,19 @@ def _user_service_remove_u2_f_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] = [ @@ -8048,8 +8021,8 @@ def _user_service_remove_u2_f_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/u2f/{u2fId}', + method='POST', + resource_path='/zitadel.user.v2.UserService/RemoveU2F', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8066,9 +8039,8 @@ def _user_service_remove_u2_f_serialize( @validate_call - def user_service_resend_email_code( + def resend_email_code( self, - user_id: StrictStr, user_service_resend_email_code_request: UserServiceResendEmailCodeRequest, _request_timeout: Union[ None, @@ -8083,12 +8055,10 @@ def user_service_resend_email_code( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceResendEmailCodeResponse: - """Resend code to verify user email + """ResendEmailCode - Resend code to verify user email. + 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 @@ -8113,8 +8083,7 @@ def user_service_resend_email_code( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_resend_email_code_serialize( - user_id=user_id, + _param = self._resend_email_code_serialize( user_service_resend_email_code_request=user_service_resend_email_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -8124,8 +8093,6 @@ def user_service_resend_email_code( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceResendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -8139,9 +8106,8 @@ def user_service_resend_email_code( @validate_call - def user_service_resend_email_code_with_http_info( + def resend_email_code_with_http_info( self, - user_id: StrictStr, user_service_resend_email_code_request: UserServiceResendEmailCodeRequest, _request_timeout: Union[ None, @@ -8156,12 +8122,10 @@ def user_service_resend_email_code_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceResendEmailCodeResponse]: - """Resend code to verify user email + """ResendEmailCode - Resend code to verify user email. + 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 @@ -8186,8 +8150,7 @@ def user_service_resend_email_code_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_resend_email_code_serialize( - user_id=user_id, + _param = self._resend_email_code_serialize( user_service_resend_email_code_request=user_service_resend_email_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -8197,8 +8160,6 @@ def user_service_resend_email_code_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceResendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -8212,9 +8173,8 @@ def user_service_resend_email_code_with_http_info( @validate_call - def user_service_resend_email_code_without_preload_content( + def resend_email_code_without_preload_content( self, - user_id: StrictStr, user_service_resend_email_code_request: UserServiceResendEmailCodeRequest, _request_timeout: Union[ None, @@ -8229,12 +8189,10 @@ def user_service_resend_email_code_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Resend code to verify user email + """ResendEmailCode - Resend code to verify user email. + 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 @@ -8259,8 +8217,7 @@ def user_service_resend_email_code_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_resend_email_code_serialize( - user_id=user_id, + _param = self._resend_email_code_serialize( user_service_resend_email_code_request=user_service_resend_email_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -8270,8 +8227,6 @@ def user_service_resend_email_code_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceResendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -8280,9 +8235,8 @@ def user_service_resend_email_code_without_preload_content( return response_data.response - def _user_service_resend_email_code_serialize( + def _resend_email_code_serialize( self, - user_id, user_service_resend_email_code_request, _request_auth, _content_type, @@ -8305,8 +8259,6 @@ def _user_service_resend_email_code_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 @@ -8344,7 +8296,7 @@ def _user_service_resend_email_code_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/email/resend', + resource_path='/zitadel.user.v2.UserService/ResendEmailCode', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8361,9 +8313,9 @@ def _user_service_resend_email_code_serialize( @validate_call - def user_service_resend_invite_code( + def resend_invite_code( self, - user_id: StrictStr, + user_service_resend_invite_code_request: UserServiceResendInviteCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8377,12 +8329,12 @@ def user_service_resend_invite_code( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceResendInviteCodeResponse: - """Resend an invite code for a user + """ResendInviteCode - 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. + Resend an invite code for a user Deprecated: Use [CreateInviteCode](apis/resources/user_service_v2/user-service-create-invite-code.api.mdx) instead. 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_resend_invite_code_request: (required) + :type user_service_resend_invite_code_request: UserServiceResendInviteCodeRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8405,8 +8357,8 @@ def user_service_resend_invite_code( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_resend_invite_code_serialize( - user_id=user_id, + _param = self._resend_invite_code_serialize( + user_service_resend_invite_code_request=user_service_resend_invite_code_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8415,8 +8367,6 @@ def user_service_resend_invite_code( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceResendInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -8430,9 +8380,9 @@ def user_service_resend_invite_code( @validate_call - def user_service_resend_invite_code_with_http_info( + def resend_invite_code_with_http_info( self, - user_id: StrictStr, + user_service_resend_invite_code_request: UserServiceResendInviteCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8446,12 +8396,12 @@ def user_service_resend_invite_code_with_http_info( _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 + """ResendInviteCode - 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. + Resend an invite code for a user Deprecated: Use [CreateInviteCode](apis/resources/user_service_v2/user-service-create-invite-code.api.mdx) instead. 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_resend_invite_code_request: (required) + :type user_service_resend_invite_code_request: UserServiceResendInviteCodeRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8474,8 +8424,8 @@ def user_service_resend_invite_code_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_resend_invite_code_serialize( - user_id=user_id, + _param = self._resend_invite_code_serialize( + user_service_resend_invite_code_request=user_service_resend_invite_code_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8484,8 +8434,6 @@ def user_service_resend_invite_code_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceResendInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -8499,9 +8447,9 @@ def user_service_resend_invite_code_with_http_info( @validate_call - def user_service_resend_invite_code_without_preload_content( + def resend_invite_code_without_preload_content( self, - user_id: StrictStr, + user_service_resend_invite_code_request: UserServiceResendInviteCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8515,12 +8463,12 @@ def user_service_resend_invite_code_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Resend an invite code for a user + """ResendInviteCode - 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. + Resend an invite code for a user Deprecated: Use [CreateInviteCode](apis/resources/user_service_v2/user-service-create-invite-code.api.mdx) instead. 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_resend_invite_code_request: (required) + :type user_service_resend_invite_code_request: UserServiceResendInviteCodeRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8543,8 +8491,8 @@ def user_service_resend_invite_code_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_resend_invite_code_serialize( - user_id=user_id, + _param = self._resend_invite_code_serialize( + user_service_resend_invite_code_request=user_service_resend_invite_code_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8553,8 +8501,6 @@ def user_service_resend_invite_code_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceResendInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -8563,9 +8509,9 @@ def user_service_resend_invite_code_without_preload_content( return response_data.response - def _user_service_resend_invite_code_serialize( + def _resend_invite_code_serialize( self, - user_id, + user_service_resend_invite_code_request, _request_auth, _content_type, _headers, @@ -8587,12 +8533,12 @@ def _user_service_resend_invite_code_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_resend_invite_code_request is not None: + _body_params = user_service_resend_invite_code_request # set the HTTP header `Accept` @@ -8603,6 +8549,19 @@ def _user_service_resend_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] = [ @@ -8611,7 +8570,7 @@ def _user_service_resend_invite_code_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/invite_code/resend', + resource_path='/zitadel.user.v2.UserService/ResendInviteCode', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8628,9 +8587,8 @@ def _user_service_resend_invite_code_serialize( @validate_call - def user_service_resend_phone_code( + def resend_phone_code( self, - user_id: StrictStr, user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest, _request_timeout: Union[ None, @@ -8645,12 +8603,10 @@ def user_service_resend_phone_code( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceResendPhoneCodeResponse: - """Resend code to verify user phone + """ResendPhoneCode - Resend code to verify user phone. + 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 @@ -8675,8 +8631,7 @@ def user_service_resend_phone_code( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_resend_phone_code_serialize( - user_id=user_id, + _param = self._resend_phone_code_serialize( user_service_resend_phone_code_request=user_service_resend_phone_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -8686,8 +8641,6 @@ def user_service_resend_phone_code( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceResendPhoneCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -8701,9 +8654,8 @@ def user_service_resend_phone_code( @validate_call - def user_service_resend_phone_code_with_http_info( + def resend_phone_code_with_http_info( self, - user_id: StrictStr, user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest, _request_timeout: Union[ None, @@ -8718,12 +8670,10 @@ def user_service_resend_phone_code_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceResendPhoneCodeResponse]: - """Resend code to verify user phone + """ResendPhoneCode - Resend code to verify user phone. + 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 @@ -8748,8 +8698,7 @@ def user_service_resend_phone_code_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_resend_phone_code_serialize( - user_id=user_id, + _param = self._resend_phone_code_serialize( user_service_resend_phone_code_request=user_service_resend_phone_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -8759,8 +8708,6 @@ def user_service_resend_phone_code_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceResendPhoneCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -8774,9 +8721,8 @@ def user_service_resend_phone_code_with_http_info( @validate_call - def user_service_resend_phone_code_without_preload_content( + def resend_phone_code_without_preload_content( self, - user_id: StrictStr, user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest, _request_timeout: Union[ None, @@ -8791,12 +8737,10 @@ def user_service_resend_phone_code_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Resend code to verify user phone + """ResendPhoneCode - Resend code to verify user phone. + 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 @@ -8821,8 +8765,7 @@ def user_service_resend_phone_code_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_resend_phone_code_serialize( - user_id=user_id, + _param = self._resend_phone_code_serialize( user_service_resend_phone_code_request=user_service_resend_phone_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -8832,8 +8775,6 @@ def user_service_resend_phone_code_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceResendPhoneCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -8842,9 +8783,8 @@ def user_service_resend_phone_code_without_preload_content( return response_data.response - def _user_service_resend_phone_code_serialize( + def _resend_phone_code_serialize( self, - user_id, user_service_resend_phone_code_request, _request_auth, _content_type, @@ -8867,8 +8807,6 @@ def _user_service_resend_phone_code_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 @@ -8906,7 +8844,7 @@ def _user_service_resend_phone_code_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/phone/resend', + resource_path='/zitadel.user.v2.UserService/ResendPhoneCode', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8923,9 +8861,8 @@ def _user_service_resend_phone_code_serialize( @validate_call - def user_service_retrieve_identity_provider_intent( + def 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, @@ -8940,12 +8877,10 @@ def user_service_retrieve_identity_provider_intent( _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 + """RetrieveIdentityProviderIntent - Retrieve the information returned by the identity provider for registration or updating an existing user with new information.. + 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 @@ -8970,8 +8905,7 @@ def user_service_retrieve_identity_provider_intent( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_retrieve_identity_provider_intent_serialize( - idp_intent_id=idp_intent_id, + _param = self._retrieve_identity_provider_intent_serialize( user_service_retrieve_identity_provider_intent_request=user_service_retrieve_identity_provider_intent_request, _request_auth=_request_auth, _content_type=_content_type, @@ -8981,8 +8915,6 @@ def user_service_retrieve_identity_provider_intent( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRetrieveIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -8996,9 +8928,8 @@ def user_service_retrieve_identity_provider_intent( @validate_call - def user_service_retrieve_identity_provider_intent_with_http_info( + def 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, @@ -9013,12 +8944,10 @@ def user_service_retrieve_identity_provider_intent_with_http_info( _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 + """RetrieveIdentityProviderIntent - Retrieve the information returned by the identity provider for registration or updating an existing user with new information.. + 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 @@ -9043,8 +8972,7 @@ def user_service_retrieve_identity_provider_intent_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_retrieve_identity_provider_intent_serialize( - idp_intent_id=idp_intent_id, + _param = self._retrieve_identity_provider_intent_serialize( user_service_retrieve_identity_provider_intent_request=user_service_retrieve_identity_provider_intent_request, _request_auth=_request_auth, _content_type=_content_type, @@ -9054,8 +8982,6 @@ def user_service_retrieve_identity_provider_intent_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRetrieveIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -9069,9 +8995,8 @@ def user_service_retrieve_identity_provider_intent_with_http_info( @validate_call - def user_service_retrieve_identity_provider_intent_without_preload_content( + def 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, @@ -9086,12 +9011,10 @@ def user_service_retrieve_identity_provider_intent_without_preload_content( _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 + """RetrieveIdentityProviderIntent - Retrieve the information returned by the identity provider for registration or updating an existing user with new information.. + 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 @@ -9116,8 +9039,7 @@ def user_service_retrieve_identity_provider_intent_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_retrieve_identity_provider_intent_serialize( - idp_intent_id=idp_intent_id, + _param = self._retrieve_identity_provider_intent_serialize( user_service_retrieve_identity_provider_intent_request=user_service_retrieve_identity_provider_intent_request, _request_auth=_request_auth, _content_type=_content_type, @@ -9127,8 +9049,6 @@ def user_service_retrieve_identity_provider_intent_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceRetrieveIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -9137,9 +9057,8 @@ def user_service_retrieve_identity_provider_intent_without_preload_content( return response_data.response - def _user_service_retrieve_identity_provider_intent_serialize( + def _retrieve_identity_provider_intent_serialize( self, - idp_intent_id, user_service_retrieve_identity_provider_intent_request, _request_auth, _content_type, @@ -9162,8 +9081,6 @@ def _user_service_retrieve_identity_provider_intent_serialize( _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 @@ -9201,7 +9118,7 @@ def _user_service_retrieve_identity_provider_intent_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/idp_intents/{idpIntentId}', + resource_path='/zitadel.user.v2.UserService/RetrieveIdentityProviderIntent', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9218,9 +9135,8 @@ def _user_service_retrieve_identity_provider_intent_serialize( @validate_call - def user_service_send_email_code( + def send_email_code( self, - user_id: StrictStr, user_service_send_email_code_request: UserServiceSendEmailCodeRequest, _request_timeout: Union[ None, @@ -9235,12 +9151,10 @@ def user_service_send_email_code( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceSendEmailCodeResponse: - """Send code to verify user email + """SendEmailCode - Send code to verify user email. + 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 @@ -9265,8 +9179,7 @@ def user_service_send_email_code( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_send_email_code_serialize( - user_id=user_id, + _param = self._send_email_code_serialize( user_service_send_email_code_request=user_service_send_email_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -9276,8 +9189,6 @@ def user_service_send_email_code( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceSendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -9291,9 +9202,8 @@ def user_service_send_email_code( @validate_call - def user_service_send_email_code_with_http_info( + def send_email_code_with_http_info( self, - user_id: StrictStr, user_service_send_email_code_request: UserServiceSendEmailCodeRequest, _request_timeout: Union[ None, @@ -9308,12 +9218,10 @@ def user_service_send_email_code_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceSendEmailCodeResponse]: - """Send code to verify user email + """SendEmailCode - Send code to verify user email. + 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 @@ -9338,8 +9246,7 @@ def user_service_send_email_code_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_send_email_code_serialize( - user_id=user_id, + _param = self._send_email_code_serialize( user_service_send_email_code_request=user_service_send_email_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -9349,8 +9256,6 @@ def user_service_send_email_code_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceSendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -9364,9 +9269,8 @@ def user_service_send_email_code_with_http_info( @validate_call - def user_service_send_email_code_without_preload_content( + def send_email_code_without_preload_content( self, - user_id: StrictStr, user_service_send_email_code_request: UserServiceSendEmailCodeRequest, _request_timeout: Union[ None, @@ -9381,12 +9285,10 @@ def user_service_send_email_code_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Send code to verify user email + """SendEmailCode - Send code to verify user email. + 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 @@ -9411,8 +9313,7 @@ def user_service_send_email_code_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_send_email_code_serialize( - user_id=user_id, + _param = self._send_email_code_serialize( user_service_send_email_code_request=user_service_send_email_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -9422,8 +9323,6 @@ def user_service_send_email_code_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceSendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -9432,9 +9331,8 @@ def user_service_send_email_code_without_preload_content( return response_data.response - def _user_service_send_email_code_serialize( + def _send_email_code_serialize( self, - user_id, user_service_send_email_code_request, _request_auth, _content_type, @@ -9457,8 +9355,6 @@ def _user_service_send_email_code_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 @@ -9496,7 +9392,7 @@ def _user_service_send_email_code_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/email/send', + resource_path='/zitadel.user.v2.UserService/SendEmailCode', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9513,9 +9409,8 @@ def _user_service_send_email_code_serialize( @validate_call - def user_service_set_email( + def set_email( self, - user_id: StrictStr, user_service_set_email_request: UserServiceSetEmailRequest, _request_timeout: Union[ None, @@ -9530,12 +9425,10 @@ def user_service_set_email( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceSetEmailResponse: - """Change the user email + """SetEmail - 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.. + 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 @@ -9560,8 +9453,7 @@ def user_service_set_email( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_set_email_serialize( - user_id=user_id, + _param = self._set_email_serialize( user_service_set_email_request=user_service_set_email_request, _request_auth=_request_auth, _content_type=_content_type, @@ -9571,8 +9463,6 @@ def user_service_set_email( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceSetEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -9586,9 +9476,8 @@ def user_service_set_email( @validate_call - def user_service_set_email_with_http_info( + def set_email_with_http_info( self, - user_id: StrictStr, user_service_set_email_request: UserServiceSetEmailRequest, _request_timeout: Union[ None, @@ -9603,12 +9492,10 @@ def user_service_set_email_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceSetEmailResponse]: - """Change the user email + """SetEmail - 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.. + 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 @@ -9633,8 +9520,7 @@ def user_service_set_email_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_set_email_serialize( - user_id=user_id, + _param = self._set_email_serialize( user_service_set_email_request=user_service_set_email_request, _request_auth=_request_auth, _content_type=_content_type, @@ -9644,8 +9530,6 @@ def user_service_set_email_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceSetEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -9659,9 +9543,8 @@ def user_service_set_email_with_http_info( @validate_call - def user_service_set_email_without_preload_content( + def set_email_without_preload_content( self, - user_id: StrictStr, user_service_set_email_request: UserServiceSetEmailRequest, _request_timeout: Union[ None, @@ -9676,12 +9559,10 @@ def user_service_set_email_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Change the user email + """SetEmail - 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.. + 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 @@ -9706,8 +9587,7 @@ def user_service_set_email_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_set_email_serialize( - user_id=user_id, + _param = self._set_email_serialize( user_service_set_email_request=user_service_set_email_request, _request_auth=_request_auth, _content_type=_content_type, @@ -9717,8 +9597,6 @@ def user_service_set_email_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceSetEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -9727,9 +9605,8 @@ def user_service_set_email_without_preload_content( return response_data.response - def _user_service_set_email_serialize( + def _set_email_serialize( self, - user_id, user_service_set_email_request, _request_auth, _content_type, @@ -9752,8 +9629,6 @@ def _user_service_set_email_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 @@ -9791,7 +9666,7 @@ def _user_service_set_email_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/email', + resource_path='/zitadel.user.v2.UserService/SetEmail', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9808,9 +9683,8 @@ def _user_service_set_email_serialize( @validate_call - def user_service_set_password( + def set_password( self, - user_id: StrictStr, user_service_set_password_request: UserServiceSetPasswordRequest, _request_timeout: Union[ None, @@ -9825,12 +9699,10 @@ def user_service_set_password( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceSetPasswordResponse: - """Change password + """SetPassword - Change the password of a user with either a verification code or the current password.. + 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 @@ -9855,8 +9727,7 @@ def user_service_set_password( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_set_password_serialize( - user_id=user_id, + _param = self._set_password_serialize( user_service_set_password_request=user_service_set_password_request, _request_auth=_request_auth, _content_type=_content_type, @@ -9866,8 +9737,6 @@ def user_service_set_password( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceSetPasswordResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -9881,9 +9750,8 @@ def user_service_set_password( @validate_call - def user_service_set_password_with_http_info( + def set_password_with_http_info( self, - user_id: StrictStr, user_service_set_password_request: UserServiceSetPasswordRequest, _request_timeout: Union[ None, @@ -9898,12 +9766,10 @@ def user_service_set_password_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceSetPasswordResponse]: - """Change password + """SetPassword - Change the password of a user with either a verification code or the current password.. + 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 @@ -9928,8 +9794,7 @@ def user_service_set_password_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_set_password_serialize( - user_id=user_id, + _param = self._set_password_serialize( user_service_set_password_request=user_service_set_password_request, _request_auth=_request_auth, _content_type=_content_type, @@ -9939,8 +9804,6 @@ def user_service_set_password_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceSetPasswordResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -9954,9 +9817,8 @@ def user_service_set_password_with_http_info( @validate_call - def user_service_set_password_without_preload_content( + def set_password_without_preload_content( self, - user_id: StrictStr, user_service_set_password_request: UserServiceSetPasswordRequest, _request_timeout: Union[ None, @@ -9971,12 +9833,10 @@ def user_service_set_password_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Change password + """SetPassword - Change the password of a user with either a verification code or the current password.. + 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 @@ -10001,8 +9861,7 @@ def user_service_set_password_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_set_password_serialize( - user_id=user_id, + _param = self._set_password_serialize( user_service_set_password_request=user_service_set_password_request, _request_auth=_request_auth, _content_type=_content_type, @@ -10012,8 +9871,6 @@ def user_service_set_password_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceSetPasswordResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -10022,9 +9879,8 @@ def user_service_set_password_without_preload_content( return response_data.response - def _user_service_set_password_serialize( + def _set_password_serialize( self, - user_id, user_service_set_password_request, _request_auth, _content_type, @@ -10047,8 +9903,6 @@ def _user_service_set_password_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 @@ -10086,7 +9940,7 @@ def _user_service_set_password_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/password', + resource_path='/zitadel.user.v2.UserService/SetPassword', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10103,9 +9957,8 @@ def _user_service_set_password_serialize( @validate_call - def user_service_set_phone( + def set_phone( self, - user_id: StrictStr, user_service_set_phone_request: UserServiceSetPhoneRequest, _request_timeout: Union[ None, @@ -10120,12 +9973,10 @@ def user_service_set_phone( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceSetPhoneResponse: - """Set the user phone + """SetPhone - 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.. + 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 @@ -10150,8 +10001,7 @@ def user_service_set_phone( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_set_phone_serialize( - user_id=user_id, + _param = self._set_phone_serialize( user_service_set_phone_request=user_service_set_phone_request, _request_auth=_request_auth, _content_type=_content_type, @@ -10161,8 +10011,6 @@ def user_service_set_phone( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceSetPhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -10176,9 +10024,8 @@ def user_service_set_phone( @validate_call - def user_service_set_phone_with_http_info( + def set_phone_with_http_info( self, - user_id: StrictStr, user_service_set_phone_request: UserServiceSetPhoneRequest, _request_timeout: Union[ None, @@ -10193,12 +10040,10 @@ def user_service_set_phone_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceSetPhoneResponse]: - """Set the user phone + """SetPhone - 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.. + 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 @@ -10223,8 +10068,7 @@ def user_service_set_phone_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_set_phone_serialize( - user_id=user_id, + _param = self._set_phone_serialize( user_service_set_phone_request=user_service_set_phone_request, _request_auth=_request_auth, _content_type=_content_type, @@ -10234,8 +10078,6 @@ def user_service_set_phone_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceSetPhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -10249,9 +10091,8 @@ def user_service_set_phone_with_http_info( @validate_call - def user_service_set_phone_without_preload_content( + def set_phone_without_preload_content( self, - user_id: StrictStr, user_service_set_phone_request: UserServiceSetPhoneRequest, _request_timeout: Union[ None, @@ -10266,12 +10107,10 @@ def user_service_set_phone_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Set the user phone + """SetPhone - 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.. + 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 @@ -10296,8 +10135,7 @@ def user_service_set_phone_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_set_phone_serialize( - user_id=user_id, + _param = self._set_phone_serialize( user_service_set_phone_request=user_service_set_phone_request, _request_auth=_request_auth, _content_type=_content_type, @@ -10307,8 +10145,6 @@ def user_service_set_phone_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceSetPhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -10317,9 +10153,8 @@ def user_service_set_phone_without_preload_content( return response_data.response - def _user_service_set_phone_serialize( + def _set_phone_serialize( self, - user_id, user_service_set_phone_request, _request_auth, _content_type, @@ -10342,8 +10177,6 @@ def _user_service_set_phone_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 @@ -10381,7 +10214,7 @@ def _user_service_set_phone_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/phone', + resource_path='/zitadel.user.v2.UserService/SetPhone', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10398,7 +10231,7 @@ def _user_service_set_phone_serialize( @validate_call - def user_service_start_identity_provider_intent( + def start_identity_provider_intent( self, user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest, _request_timeout: Union[ @@ -10414,9 +10247,9 @@ def user_service_start_identity_provider_intent( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceStartIdentityProviderIntentResponse: - """Start flow with an identity provider + """StartIdentityProviderIntent - Start a flow with an identity provider, for external login, registration or linking.. + 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 @@ -10442,7 +10275,7 @@ def user_service_start_identity_provider_intent( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_start_identity_provider_intent_serialize( + _param = self._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, @@ -10452,8 +10285,6 @@ def user_service_start_identity_provider_intent( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceStartIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -10467,7 +10298,7 @@ def user_service_start_identity_provider_intent( @validate_call - def user_service_start_identity_provider_intent_with_http_info( + def start_identity_provider_intent_with_http_info( self, user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest, _request_timeout: Union[ @@ -10483,9 +10314,9 @@ def user_service_start_identity_provider_intent_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceStartIdentityProviderIntentResponse]: - """Start flow with an identity provider + """StartIdentityProviderIntent - Start a flow with an identity provider, for external login, registration or linking.. + 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 @@ -10511,7 +10342,7 @@ def user_service_start_identity_provider_intent_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_start_identity_provider_intent_serialize( + _param = self._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, @@ -10521,8 +10352,6 @@ def user_service_start_identity_provider_intent_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceStartIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -10536,7 +10365,7 @@ def user_service_start_identity_provider_intent_with_http_info( @validate_call - def user_service_start_identity_provider_intent_without_preload_content( + def start_identity_provider_intent_without_preload_content( self, user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest, _request_timeout: Union[ @@ -10552,9 +10381,9 @@ def user_service_start_identity_provider_intent_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Start flow with an identity provider + """StartIdentityProviderIntent - Start a flow with an identity provider, for external login, registration or linking.. + 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 @@ -10580,7 +10409,7 @@ def user_service_start_identity_provider_intent_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_start_identity_provider_intent_serialize( + _param = self._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, @@ -10590,8 +10419,6 @@ def user_service_start_identity_provider_intent_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceStartIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -10600,7 +10427,7 @@ def user_service_start_identity_provider_intent_without_preload_content( return response_data.response - def _user_service_start_identity_provider_intent_serialize( + def _start_identity_provider_intent_serialize( self, user_service_start_identity_provider_intent_request, _request_auth, @@ -10661,7 +10488,7 @@ def _user_service_start_identity_provider_intent_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/idp_intents', + resource_path='/zitadel.user.v2.UserService/StartIdentityProviderIntent', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10678,9 +10505,9 @@ def _user_service_start_identity_provider_intent_serialize( @validate_call - def user_service_unlock_user( + def unlock_user( self, - user_id: StrictStr, + user_service_unlock_user_request: UserServiceUnlockUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10694,12 +10521,12 @@ def user_service_unlock_user( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceUnlockUserResponse: - """Unlock user + """UnlockUser - 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.).. + 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 user_service_unlock_user_request: (required) + :type user_service_unlock_user_request: UserServiceUnlockUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10722,8 +10549,8 @@ def user_service_unlock_user( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_unlock_user_serialize( - user_id=user_id, + _param = self._unlock_user_serialize( + user_service_unlock_user_request=user_service_unlock_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10732,8 +10559,6 @@ def user_service_unlock_user( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceUnlockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -10747,9 +10572,9 @@ def user_service_unlock_user( @validate_call - def user_service_unlock_user_with_http_info( + def unlock_user_with_http_info( self, - user_id: StrictStr, + user_service_unlock_user_request: UserServiceUnlockUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10763,12 +10588,12 @@ def user_service_unlock_user_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceUnlockUserResponse]: - """Unlock user + """UnlockUser - 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.).. + 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 user_service_unlock_user_request: (required) + :type user_service_unlock_user_request: UserServiceUnlockUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10791,8 +10616,8 @@ def user_service_unlock_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_unlock_user_serialize( - user_id=user_id, + _param = self._unlock_user_serialize( + user_service_unlock_user_request=user_service_unlock_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10801,8 +10626,6 @@ def user_service_unlock_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceUnlockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -10816,9 +10639,9 @@ def user_service_unlock_user_with_http_info( @validate_call - def user_service_unlock_user_without_preload_content( + def unlock_user_without_preload_content( self, - user_id: StrictStr, + user_service_unlock_user_request: UserServiceUnlockUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10832,12 +10655,12 @@ def user_service_unlock_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Unlock user + """UnlockUser - 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.).. + 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 user_service_unlock_user_request: (required) + :type user_service_unlock_user_request: UserServiceUnlockUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10860,8 +10683,8 @@ def user_service_unlock_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_unlock_user_serialize( - user_id=user_id, + _param = self._unlock_user_serialize( + user_service_unlock_user_request=user_service_unlock_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10870,8 +10693,6 @@ def user_service_unlock_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceUnlockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -10880,9 +10701,9 @@ def user_service_unlock_user_without_preload_content( return response_data.response - def _user_service_unlock_user_serialize( + def _unlock_user_serialize( self, - user_id, + user_service_unlock_user_request, _request_auth, _content_type, _headers, @@ -10904,12 +10725,12 @@ def _user_service_unlock_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_unlock_user_request is not None: + _body_params = user_service_unlock_user_request # set the HTTP header `Accept` @@ -10941,7 +10762,7 @@ def _user_service_unlock_user_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/unlock', + resource_path='/zitadel.user.v2.UserService/UnlockUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10958,9 +10779,8 @@ def _user_service_unlock_user_serialize( @validate_call - def user_service_update_human_user( + def update_human_user( self, - user_id: StrictStr, user_service_update_human_user_request: UserServiceUpdateHumanUserRequest, _request_timeout: Union[ None, @@ -10975,12 +10795,10 @@ def user_service_update_human_user( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceUpdateHumanUserResponse: - """Update User + """UpdateHumanUser - Update all information from a user.. + 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 @@ -11005,8 +10823,7 @@ def user_service_update_human_user( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_update_human_user_serialize( - user_id=user_id, + _param = self._update_human_user_serialize( user_service_update_human_user_request=user_service_update_human_user_request, _request_auth=_request_auth, _content_type=_content_type, @@ -11016,8 +10833,6 @@ def user_service_update_human_user( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceUpdateHumanUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -11031,9 +10846,8 @@ def user_service_update_human_user( @validate_call - def user_service_update_human_user_with_http_info( + def update_human_user_with_http_info( self, - user_id: StrictStr, user_service_update_human_user_request: UserServiceUpdateHumanUserRequest, _request_timeout: Union[ None, @@ -11048,12 +10862,10 @@ def user_service_update_human_user_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceUpdateHumanUserResponse]: - """Update User + """UpdateHumanUser - Update all information from a user.. + 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 @@ -11078,8 +10890,7 @@ def user_service_update_human_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_update_human_user_serialize( - user_id=user_id, + _param = self._update_human_user_serialize( user_service_update_human_user_request=user_service_update_human_user_request, _request_auth=_request_auth, _content_type=_content_type, @@ -11089,8 +10900,6 @@ def user_service_update_human_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceUpdateHumanUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -11104,9 +10913,8 @@ def user_service_update_human_user_with_http_info( @validate_call - def user_service_update_human_user_without_preload_content( + def update_human_user_without_preload_content( self, - user_id: StrictStr, user_service_update_human_user_request: UserServiceUpdateHumanUserRequest, _request_timeout: Union[ None, @@ -11121,12 +10929,10 @@ def user_service_update_human_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update User + """UpdateHumanUser - Update all information from a user.. + 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 @@ -11151,8 +10957,7 @@ def user_service_update_human_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_update_human_user_serialize( - user_id=user_id, + _param = self._update_human_user_serialize( user_service_update_human_user_request=user_service_update_human_user_request, _request_auth=_request_auth, _content_type=_content_type, @@ -11162,8 +10967,6 @@ def user_service_update_human_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceUpdateHumanUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -11172,9 +10975,8 @@ def user_service_update_human_user_without_preload_content( return response_data.response - def _user_service_update_human_user_serialize( + def _update_human_user_serialize( self, - user_id, user_service_update_human_user_request, _request_auth, _content_type, @@ -11197,8 +10999,6 @@ def _user_service_update_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 @@ -11235,8 +11035,8 @@ def _user_service_update_human_user_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/users/human/{userId}', + method='POST', + resource_path='/zitadel.user.v2.UserService/UpdateHumanUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -11253,9 +11053,8 @@ def _user_service_update_human_user_serialize( @validate_call - def user_service_verify_email( + def verify_email( self, - user_id: StrictStr, user_service_verify_email_request: UserServiceVerifyEmailRequest, _request_timeout: Union[ None, @@ -11270,12 +11069,10 @@ def user_service_verify_email( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceVerifyEmailResponse: - """Verify the email + """VerifyEmail - Verify the email with the generated code. + 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 @@ -11300,8 +11097,7 @@ def user_service_verify_email( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_email_serialize( - user_id=user_id, + _param = self._verify_email_serialize( user_service_verify_email_request=user_service_verify_email_request, _request_auth=_request_auth, _content_type=_content_type, @@ -11311,8 +11107,6 @@ def user_service_verify_email( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -11326,9 +11120,8 @@ def user_service_verify_email( @validate_call - def user_service_verify_email_with_http_info( + def verify_email_with_http_info( self, - user_id: StrictStr, user_service_verify_email_request: UserServiceVerifyEmailRequest, _request_timeout: Union[ None, @@ -11343,12 +11136,10 @@ def user_service_verify_email_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceVerifyEmailResponse]: - """Verify the email + """VerifyEmail - Verify the email with the generated code. + 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 @@ -11373,8 +11164,7 @@ def user_service_verify_email_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_email_serialize( - user_id=user_id, + _param = self._verify_email_serialize( user_service_verify_email_request=user_service_verify_email_request, _request_auth=_request_auth, _content_type=_content_type, @@ -11384,8 +11174,6 @@ def user_service_verify_email_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -11399,9 +11187,8 @@ def user_service_verify_email_with_http_info( @validate_call - def user_service_verify_email_without_preload_content( + def verify_email_without_preload_content( self, - user_id: StrictStr, user_service_verify_email_request: UserServiceVerifyEmailRequest, _request_timeout: Union[ None, @@ -11416,12 +11203,10 @@ def user_service_verify_email_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Verify the email + """VerifyEmail - Verify the email with the generated code. + 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 @@ -11446,8 +11231,7 @@ def user_service_verify_email_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_email_serialize( - user_id=user_id, + _param = self._verify_email_serialize( user_service_verify_email_request=user_service_verify_email_request, _request_auth=_request_auth, _content_type=_content_type, @@ -11457,8 +11241,6 @@ def user_service_verify_email_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -11467,9 +11249,8 @@ def user_service_verify_email_without_preload_content( return response_data.response - def _user_service_verify_email_serialize( + def _verify_email_serialize( self, - user_id, user_service_verify_email_request, _request_auth, _content_type, @@ -11492,8 +11273,6 @@ def _user_service_verify_email_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 @@ -11531,7 +11310,7 @@ def _user_service_verify_email_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/email/verify', + resource_path='/zitadel.user.v2.UserService/VerifyEmail', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -11548,9 +11327,8 @@ def _user_service_verify_email_serialize( @validate_call - def user_service_verify_invite_code( + def verify_invite_code( self, - user_id: StrictStr, user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest, _request_timeout: Union[ None, @@ -11565,12 +11343,10 @@ def user_service_verify_invite_code( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceVerifyInviteCodeResponse: - """Verify an invite code for a user + """VerifyInviteCode - 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. + Verify an invite code for a user 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_invite_code_request: (required) :type user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest :param _request_timeout: timeout setting for this request. If one @@ -11595,8 +11371,7 @@ 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, + _param = self._verify_invite_code_serialize( user_service_verify_invite_code_request=user_service_verify_invite_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -11606,8 +11381,6 @@ def user_service_verify_invite_code( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -11621,9 +11394,8 @@ def user_service_verify_invite_code( @validate_call - def user_service_verify_invite_code_with_http_info( + def verify_invite_code_with_http_info( self, - user_id: StrictStr, user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest, _request_timeout: Union[ None, @@ -11638,12 +11410,10 @@ def user_service_verify_invite_code_with_http_info( _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 + """VerifyInviteCode - 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. + Verify an invite code for a user 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_invite_code_request: (required) :type user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest :param _request_timeout: timeout setting for this request. If one @@ -11668,8 +11438,7 @@ def user_service_verify_invite_code_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_invite_code_serialize( - user_id=user_id, + _param = self._verify_invite_code_serialize( user_service_verify_invite_code_request=user_service_verify_invite_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -11679,8 +11448,6 @@ def user_service_verify_invite_code_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -11694,9 +11461,8 @@ def user_service_verify_invite_code_with_http_info( @validate_call - def user_service_verify_invite_code_without_preload_content( + def verify_invite_code_without_preload_content( self, - user_id: StrictStr, user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest, _request_timeout: Union[ None, @@ -11711,12 +11477,10 @@ def user_service_verify_invite_code_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Verify an invite code for a user + """VerifyInviteCode - 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. + Verify an invite code for a user 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_invite_code_request: (required) :type user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest :param _request_timeout: timeout setting for this request. If one @@ -11741,8 +11505,7 @@ def user_service_verify_invite_code_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_invite_code_serialize( - user_id=user_id, + _param = self._verify_invite_code_serialize( user_service_verify_invite_code_request=user_service_verify_invite_code_request, _request_auth=_request_auth, _content_type=_content_type, @@ -11752,8 +11515,6 @@ def user_service_verify_invite_code_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -11762,9 +11523,8 @@ def user_service_verify_invite_code_without_preload_content( return response_data.response - def _user_service_verify_invite_code_serialize( + def _verify_invite_code_serialize( self, - user_id, user_service_verify_invite_code_request, _request_auth, _content_type, @@ -11787,8 +11547,6 @@ def _user_service_verify_invite_code_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 @@ -11826,7 +11584,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='/zitadel.user.v2.UserService/VerifyInviteCode', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -11843,10 +11601,8 @@ def _user_service_verify_invite_code_serialize( @validate_call - def user_service_verify_passkey_registration( + def verify_passkey_registration( self, - user_id: StrictStr, - passkey_id: StrictStr, user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest, _request_timeout: Union[ None, @@ -11861,14 +11617,10 @@ def user_service_verify_passkey_registration( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceVerifyPasskeyRegistrationResponse: - """Verify a passkey for a user + """VerifyPasskeyRegistration - Verify the passkey registration with the public key credential.. + Verify a passkey for a user Verify the passkey registration with the public key credential.. - :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 _request_timeout: timeout setting for this request. If one @@ -11893,9 +11645,7 @@ def user_service_verify_passkey_registration( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_passkey_registration_serialize( - user_id=user_id, - passkey_id=passkey_id, + _param = self._verify_passkey_registration_serialize( user_service_verify_passkey_registration_request=user_service_verify_passkey_registration_request, _request_auth=_request_auth, _content_type=_content_type, @@ -11905,8 +11655,6 @@ def user_service_verify_passkey_registration( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyPasskeyRegistrationResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -11920,10 +11668,8 @@ def user_service_verify_passkey_registration( @validate_call - def user_service_verify_passkey_registration_with_http_info( + def verify_passkey_registration_with_http_info( self, - user_id: StrictStr, - passkey_id: StrictStr, user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest, _request_timeout: Union[ None, @@ -11938,14 +11684,10 @@ def user_service_verify_passkey_registration_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceVerifyPasskeyRegistrationResponse]: - """Verify a passkey for a user + """VerifyPasskeyRegistration - Verify the passkey registration with the public key credential.. + Verify a passkey for a user Verify the passkey registration with the public key credential.. - :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 _request_timeout: timeout setting for this request. If one @@ -11970,9 +11712,7 @@ def user_service_verify_passkey_registration_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_passkey_registration_serialize( - user_id=user_id, - passkey_id=passkey_id, + _param = self._verify_passkey_registration_serialize( user_service_verify_passkey_registration_request=user_service_verify_passkey_registration_request, _request_auth=_request_auth, _content_type=_content_type, @@ -11982,8 +11722,6 @@ def user_service_verify_passkey_registration_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyPasskeyRegistrationResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -11997,10 +11735,8 @@ def user_service_verify_passkey_registration_with_http_info( @validate_call - def user_service_verify_passkey_registration_without_preload_content( + def verify_passkey_registration_without_preload_content( self, - user_id: StrictStr, - passkey_id: StrictStr, user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest, _request_timeout: Union[ None, @@ -12015,14 +11751,10 @@ def user_service_verify_passkey_registration_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Verify a passkey for a user + """VerifyPasskeyRegistration - Verify the passkey registration with the public key credential.. + Verify a passkey for a user Verify the passkey registration with the public key credential.. - :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 _request_timeout: timeout setting for this request. If one @@ -12047,9 +11779,7 @@ 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, + _param = self._verify_passkey_registration_serialize( user_service_verify_passkey_registration_request=user_service_verify_passkey_registration_request, _request_auth=_request_auth, _content_type=_content_type, @@ -12059,8 +11789,6 @@ def user_service_verify_passkey_registration_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyPasskeyRegistrationResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -12069,10 +11797,8 @@ def user_service_verify_passkey_registration_without_preload_content( return response_data.response - def _user_service_verify_passkey_registration_serialize( + def _verify_passkey_registration_serialize( self, - user_id, - passkey_id, user_service_verify_passkey_registration_request, _request_auth, _content_type, @@ -12095,10 +11821,6 @@ 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 @@ -12136,7 +11858,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='/zitadel.user.v2.UserService/VerifyPasskeyRegistration', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12153,9 +11875,8 @@ def _user_service_verify_passkey_registration_serialize( @validate_call - def user_service_verify_phone( + def verify_phone( self, - user_id: StrictStr, user_service_verify_phone_request: UserServiceVerifyPhoneRequest, _request_timeout: Union[ None, @@ -12170,12 +11891,10 @@ def user_service_verify_phone( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceVerifyPhoneResponse: - """Verify the phone + """VerifyPhone - Verify the phone with the generated code.. + Verify the phone Verify the phone with the generated code.. - :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 @@ -12200,8 +11919,7 @@ def user_service_verify_phone( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_phone_serialize( - user_id=user_id, + _param = self._verify_phone_serialize( user_service_verify_phone_request=user_service_verify_phone_request, _request_auth=_request_auth, _content_type=_content_type, @@ -12211,8 +11929,6 @@ def user_service_verify_phone( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyPhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -12226,9 +11942,8 @@ def user_service_verify_phone( @validate_call - def user_service_verify_phone_with_http_info( + def verify_phone_with_http_info( self, - user_id: StrictStr, user_service_verify_phone_request: UserServiceVerifyPhoneRequest, _request_timeout: Union[ None, @@ -12243,12 +11958,10 @@ def user_service_verify_phone_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UserServiceVerifyPhoneResponse]: - """Verify the phone + """VerifyPhone - Verify the phone with the generated code.. + Verify the phone Verify the phone with the generated code.. - :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 @@ -12273,8 +11986,7 @@ def user_service_verify_phone_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_phone_serialize( - user_id=user_id, + _param = self._verify_phone_serialize( user_service_verify_phone_request=user_service_verify_phone_request, _request_auth=_request_auth, _content_type=_content_type, @@ -12284,8 +11996,6 @@ def user_service_verify_phone_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyPhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -12299,9 +12009,8 @@ def user_service_verify_phone_with_http_info( @validate_call - def user_service_verify_phone_without_preload_content( + def verify_phone_without_preload_content( self, - user_id: StrictStr, user_service_verify_phone_request: UserServiceVerifyPhoneRequest, _request_timeout: Union[ None, @@ -12316,12 +12025,10 @@ def user_service_verify_phone_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Verify the phone + """VerifyPhone - Verify the phone with the generated code.. + Verify the phone Verify the phone with the generated code.. - :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 @@ -12346,8 +12053,7 @@ def user_service_verify_phone_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_phone_serialize( - user_id=user_id, + _param = self._verify_phone_serialize( user_service_verify_phone_request=user_service_verify_phone_request, _request_auth=_request_auth, _content_type=_content_type, @@ -12357,8 +12063,6 @@ def user_service_verify_phone_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyPhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -12367,9 +12071,8 @@ def user_service_verify_phone_without_preload_content( return response_data.response - def _user_service_verify_phone_serialize( + def _verify_phone_serialize( self, - user_id, user_service_verify_phone_request, _request_auth, _content_type, @@ -12392,8 +12095,6 @@ def _user_service_verify_phone_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 @@ -12431,7 +12132,7 @@ def _user_service_verify_phone_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/phone/verify', + resource_path='/zitadel.user.v2.UserService/VerifyPhone', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12448,9 +12149,8 @@ def _user_service_verify_phone_serialize( @validate_call - def user_service_verify_totp_registration( + def verify_totp_registration( self, - user_id: StrictStr, user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest, _request_timeout: Union[ None, @@ -12465,12 +12165,10 @@ def user_service_verify_totp_registration( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceVerifyTOTPRegistrationResponse: - """Verify a TOTP generator for a user + """VerifyTOTPRegistration - Verify the TOTP registration with a generated code.. + Verify a TOTP generator for a user Verify the TOTP registration with a 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 _request_timeout: timeout setting for this request. If one @@ -12495,8 +12193,7 @@ def user_service_verify_totp_registration( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_totp_registration_serialize( - user_id=user_id, + _param = self._verify_totp_registration_serialize( user_service_verify_totp_registration_request=user_service_verify_totp_registration_request, _request_auth=_request_auth, _content_type=_content_type, @@ -12506,8 +12203,6 @@ def user_service_verify_totp_registration( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyTOTPRegistrationResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -12521,9 +12216,8 @@ def user_service_verify_totp_registration( @validate_call - def user_service_verify_totp_registration_with_http_info( + def verify_totp_registration_with_http_info( self, - user_id: StrictStr, user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest, _request_timeout: Union[ None, @@ -12538,12 +12232,10 @@ def user_service_verify_totp_registration_with_http_info( _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 + """VerifyTOTPRegistration - Verify the TOTP registration with a generated code.. + Verify a TOTP generator for a user Verify the TOTP registration with a 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 _request_timeout: timeout setting for this request. If one @@ -12568,8 +12260,7 @@ def user_service_verify_totp_registration_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_totp_registration_serialize( - user_id=user_id, + _param = self._verify_totp_registration_serialize( user_service_verify_totp_registration_request=user_service_verify_totp_registration_request, _request_auth=_request_auth, _content_type=_content_type, @@ -12579,8 +12270,6 @@ def user_service_verify_totp_registration_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyTOTPRegistrationResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -12594,9 +12283,8 @@ def user_service_verify_totp_registration_with_http_info( @validate_call - def user_service_verify_totp_registration_without_preload_content( + def verify_totp_registration_without_preload_content( self, - user_id: StrictStr, user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest, _request_timeout: Union[ None, @@ -12611,12 +12299,10 @@ def user_service_verify_totp_registration_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Verify a TOTP generator for a user + """VerifyTOTPRegistration - Verify the TOTP registration with a generated code.. + Verify a TOTP generator for a user Verify the TOTP registration with a 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 _request_timeout: timeout setting for this request. If one @@ -12641,8 +12327,7 @@ def user_service_verify_totp_registration_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_totp_registration_serialize( - user_id=user_id, + _param = self._verify_totp_registration_serialize( user_service_verify_totp_registration_request=user_service_verify_totp_registration_request, _request_auth=_request_auth, _content_type=_content_type, @@ -12652,8 +12337,6 @@ def user_service_verify_totp_registration_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyTOTPRegistrationResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -12662,9 +12345,8 @@ def user_service_verify_totp_registration_without_preload_content( return response_data.response - def _user_service_verify_totp_registration_serialize( + def _verify_totp_registration_serialize( self, - user_id, user_service_verify_totp_registration_request, _request_auth, _content_type, @@ -12687,8 +12369,6 @@ def _user_service_verify_totp_registration_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 @@ -12726,7 +12406,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='/zitadel.user.v2.UserService/VerifyTOTPRegistration', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12743,10 +12423,8 @@ def _user_service_verify_totp_registration_serialize( @validate_call - def user_service_verify_u2_f_registration( + def verify_u2_f_registration( self, - user_id: StrictStr, - u2f_id: StrictStr, user_service_verify_u2_f_registration_request: UserServiceVerifyU2FRegistrationRequest, _request_timeout: Union[ None, @@ -12761,14 +12439,10 @@ def user_service_verify_u2_f_registration( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceVerifyU2FRegistrationResponse: - """Verify a u2f token for a user + """VerifyU2FRegistration - Verify the u2f token registration with the public key credential.. + Verify a u2f token for a user Verify the u2f token registration with the public key credential.. - :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 _request_timeout: timeout setting for this request. If one @@ -12793,9 +12467,7 @@ def user_service_verify_u2_f_registration( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_u2_f_registration_serialize( - user_id=user_id, - u2f_id=u2f_id, + _param = self._verify_u2_f_registration_serialize( user_service_verify_u2_f_registration_request=user_service_verify_u2_f_registration_request, _request_auth=_request_auth, _content_type=_content_type, @@ -12805,8 +12477,6 @@ def user_service_verify_u2_f_registration( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyU2FRegistrationResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -12820,10 +12490,8 @@ def user_service_verify_u2_f_registration( @validate_call - def user_service_verify_u2_f_registration_with_http_info( + def verify_u2_f_registration_with_http_info( self, - user_id: StrictStr, - u2f_id: StrictStr, user_service_verify_u2_f_registration_request: UserServiceVerifyU2FRegistrationRequest, _request_timeout: Union[ None, @@ -12838,14 +12506,10 @@ def user_service_verify_u2_f_registration_with_http_info( _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 + """VerifyU2FRegistration - Verify the u2f token registration with the public key credential.. + Verify a u2f token for a user Verify the u2f token registration with the public key credential.. - :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 _request_timeout: timeout setting for this request. If one @@ -12870,9 +12534,7 @@ 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( - user_id=user_id, - u2f_id=u2f_id, + _param = self._verify_u2_f_registration_serialize( user_service_verify_u2_f_registration_request=user_service_verify_u2_f_registration_request, _request_auth=_request_auth, _content_type=_content_type, @@ -12882,8 +12544,6 @@ def user_service_verify_u2_f_registration_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyU2FRegistrationResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -12897,10 +12557,8 @@ def user_service_verify_u2_f_registration_with_http_info( @validate_call - def user_service_verify_u2_f_registration_without_preload_content( + def verify_u2_f_registration_without_preload_content( self, - user_id: StrictStr, - u2f_id: StrictStr, user_service_verify_u2_f_registration_request: UserServiceVerifyU2FRegistrationRequest, _request_timeout: Union[ None, @@ -12915,14 +12573,10 @@ def user_service_verify_u2_f_registration_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Verify a u2f token for a user + """VerifyU2FRegistration - Verify the u2f token registration with the public key credential.. + Verify a u2f token for a user Verify the u2f token registration with the public key credential.. - :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 _request_timeout: timeout setting for this request. If one @@ -12947,9 +12601,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( - user_id=user_id, - u2f_id=u2f_id, + _param = self._verify_u2_f_registration_serialize( user_service_verify_u2_f_registration_request=user_service_verify_u2_f_registration_request, _request_auth=_request_auth, _content_type=_content_type, @@ -12959,8 +12611,6 @@ def user_service_verify_u2_f_registration_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyU2FRegistrationResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } response_data = self.api_client.call_api( *_param, @@ -12969,10 +12619,8 @@ def user_service_verify_u2_f_registration_without_preload_content( return response_data.response - def _user_service_verify_u2_f_registration_serialize( + def _verify_u2_f_registration_serialize( self, - user_id, - u2f_id, user_service_verify_u2_f_registration_request, _request_auth, _content_type, @@ -12995,10 +12643,6 @@ def _user_service_verify_u2_f_registration_serialize( _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 @@ -13036,7 +12680,7 @@ def _user_service_verify_u2_f_registration_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/u2f/{u2fId}', + resource_path='/zitadel.user.v2.UserService/VerifyU2FRegistration', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/models/__init__.py b/zitadel_client/models/__init__.py index 5c2f3f26..c2efc321 100644 --- a/zitadel_client/models/__init__.py +++ b/zitadel_client/models/__init__.py @@ -14,68 +14,419 @@ # import models into model package -from zitadel_client.models.action_service_beta_condition import ActionServiceBetaCondition -from zitadel_client.models.action_service_beta_create_target_response import ActionServiceBetaCreateTargetResponse -from zitadel_client.models.action_service_beta_delete_target_response import ActionServiceBetaDeleteTargetResponse -from zitadel_client.models.action_service_beta_event_execution import ActionServiceBetaEventExecution -from zitadel_client.models.action_service_beta_execution import ActionServiceBetaExecution -from zitadel_client.models.action_service_beta_function_execution import ActionServiceBetaFunctionExecution -from zitadel_client.models.action_service_beta_get_target_response import ActionServiceBetaGetTargetResponse -from zitadel_client.models.action_service_beta_in_target_ids_filter import ActionServiceBetaInTargetIDsFilter -from zitadel_client.models.action_service_beta_list_execution_functions_response import ActionServiceBetaListExecutionFunctionsResponse -from zitadel_client.models.action_service_beta_list_execution_methods_response import ActionServiceBetaListExecutionMethodsResponse -from zitadel_client.models.action_service_beta_list_execution_services_response import ActionServiceBetaListExecutionServicesResponse -from zitadel_client.models.action_service_beta_list_executions_response import ActionServiceBetaListExecutionsResponse -from zitadel_client.models.action_service_beta_list_targets_response import ActionServiceBetaListTargetsResponse -from zitadel_client.models.action_service_beta_pagination_request import ActionServiceBetaPaginationRequest -from zitadel_client.models.action_service_beta_pagination_response import ActionServiceBetaPaginationResponse -from zitadel_client.models.action_service_beta_rest_call import ActionServiceBetaRESTCall -from zitadel_client.models.action_service_beta_rest_webhook import ActionServiceBetaRESTWebhook -from zitadel_client.models.action_service_beta_request_execution import ActionServiceBetaRequestExecution -from zitadel_client.models.action_service_beta_response_execution import ActionServiceBetaResponseExecution -from zitadel_client.models.action_service_beta_set_execution_response import ActionServiceBetaSetExecutionResponse -from zitadel_client.models.action_service_beta_target import ActionServiceBetaTarget -from zitadel_client.models.action_service_beta_target_field_name import ActionServiceBetaTargetFieldName -from zitadel_client.models.action_service_beta_target_name_filter import ActionServiceBetaTargetNameFilter -from zitadel_client.models.action_service_beta_target_search_filter import ActionServiceBetaTargetSearchFilter -from zitadel_client.models.action_service_beta_text_filter_method import ActionServiceBetaTextFilterMethod -from zitadel_client.models.action_service_beta_update_target_response import ActionServiceBetaUpdateTargetResponse -from zitadel_client.models.action_service_create_target_request import ActionServiceCreateTargetRequest -from zitadel_client.models.action_service_list_targets_request import ActionServiceListTargetsRequest -from zitadel_client.models.action_service_protobuf_any import ActionServiceProtobufAny -from zitadel_client.models.action_service_rpc_status import ActionServiceRpcStatus -from zitadel_client.models.action_service_set_execution_request import ActionServiceSetExecutionRequest -from zitadel_client.models.action_service_update_target_request import ActionServiceUpdateTargetRequest +from zitadel_client.models.all import All +from zitadel_client.models.all1 import All1 +from zitadel_client.models.and_query import AndQuery +from zitadel_client.models.and_query1 import AndQuery1 +from zitadel_client.models.apple import Apple +from zitadel_client.models.auth_url import AuthUrl +from zitadel_client.models.azure_ad import AzureAd +from zitadel_client.models.beta_action_service_any import BetaActionServiceAny +from zitadel_client.models.beta_action_service_condition import BetaActionServiceCondition +from zitadel_client.models.beta_action_service_connect_error import BetaActionServiceConnectError +from zitadel_client.models.beta_action_service_create_target_request import BetaActionServiceCreateTargetRequest +from zitadel_client.models.beta_action_service_create_target_response import BetaActionServiceCreateTargetResponse +from zitadel_client.models.beta_action_service_delete_target_request import BetaActionServiceDeleteTargetRequest +from zitadel_client.models.beta_action_service_delete_target_response import BetaActionServiceDeleteTargetResponse +from zitadel_client.models.beta_action_service_event_execution import BetaActionServiceEventExecution +from zitadel_client.models.beta_action_service_execution import BetaActionServiceExecution +from zitadel_client.models.beta_action_service_execution_field_name import BetaActionServiceExecutionFieldName +from zitadel_client.models.beta_action_service_execution_search_filter import BetaActionServiceExecutionSearchFilter +from zitadel_client.models.beta_action_service_execution_type import BetaActionServiceExecutionType +from zitadel_client.models.beta_action_service_execution_type_filter import BetaActionServiceExecutionTypeFilter +from zitadel_client.models.beta_action_service_function_execution import BetaActionServiceFunctionExecution +from zitadel_client.models.beta_action_service_get_target_request import BetaActionServiceGetTargetRequest +from zitadel_client.models.beta_action_service_get_target_response import BetaActionServiceGetTargetResponse +from zitadel_client.models.beta_action_service_in_conditions_filter import BetaActionServiceInConditionsFilter +from zitadel_client.models.beta_action_service_in_target_ids_filter import BetaActionServiceInTargetIDsFilter +from zitadel_client.models.beta_action_service_list_execution_functions_response import BetaActionServiceListExecutionFunctionsResponse +from zitadel_client.models.beta_action_service_list_execution_methods_response import BetaActionServiceListExecutionMethodsResponse +from zitadel_client.models.beta_action_service_list_execution_services_response import BetaActionServiceListExecutionServicesResponse +from zitadel_client.models.beta_action_service_list_executions_request import BetaActionServiceListExecutionsRequest +from zitadel_client.models.beta_action_service_list_executions_response import BetaActionServiceListExecutionsResponse +from zitadel_client.models.beta_action_service_list_targets_request import BetaActionServiceListTargetsRequest +from zitadel_client.models.beta_action_service_list_targets_response import BetaActionServiceListTargetsResponse +from zitadel_client.models.beta_action_service_pagination_request import BetaActionServicePaginationRequest +from zitadel_client.models.beta_action_service_pagination_response import BetaActionServicePaginationResponse +from zitadel_client.models.beta_action_service_rest_call import BetaActionServiceRESTCall +from zitadel_client.models.beta_action_service_rest_webhook import BetaActionServiceRESTWebhook +from zitadel_client.models.beta_action_service_request_execution import BetaActionServiceRequestExecution +from zitadel_client.models.beta_action_service_response_execution import BetaActionServiceResponseExecution +from zitadel_client.models.beta_action_service_set_execution_request import BetaActionServiceSetExecutionRequest +from zitadel_client.models.beta_action_service_set_execution_response import BetaActionServiceSetExecutionResponse +from zitadel_client.models.beta_action_service_target import BetaActionServiceTarget +from zitadel_client.models.beta_action_service_target_field_name import BetaActionServiceTargetFieldName +from zitadel_client.models.beta_action_service_target_filter import BetaActionServiceTargetFilter +from zitadel_client.models.beta_action_service_target_name_filter import BetaActionServiceTargetNameFilter +from zitadel_client.models.beta_action_service_target_search_filter import BetaActionServiceTargetSearchFilter +from zitadel_client.models.beta_action_service_text_filter_method import BetaActionServiceTextFilterMethod +from zitadel_client.models.beta_action_service_update_target_request import BetaActionServiceUpdateTargetRequest +from zitadel_client.models.beta_action_service_update_target_response import BetaActionServiceUpdateTargetResponse +from zitadel_client.models.beta_feature_service_any import BetaFeatureServiceAny +from zitadel_client.models.beta_feature_service_connect_error import BetaFeatureServiceConnectError +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from zitadel_client.models.beta_feature_service_feature_flag import BetaFeatureServiceFeatureFlag +from zitadel_client.models.beta_feature_service_get_instance_features_request import BetaFeatureServiceGetInstanceFeaturesRequest +from zitadel_client.models.beta_feature_service_get_instance_features_response import BetaFeatureServiceGetInstanceFeaturesResponse +from zitadel_client.models.beta_feature_service_get_organization_features_request import BetaFeatureServiceGetOrganizationFeaturesRequest +from zitadel_client.models.beta_feature_service_get_organization_features_response import BetaFeatureServiceGetOrganizationFeaturesResponse +from zitadel_client.models.beta_feature_service_get_system_features_response import BetaFeatureServiceGetSystemFeaturesResponse +from zitadel_client.models.beta_feature_service_get_user_features_request import BetaFeatureServiceGetUserFeaturesRequest +from zitadel_client.models.beta_feature_service_get_user_features_response import BetaFeatureServiceGetUserFeaturesResponse +from zitadel_client.models.beta_feature_service_improved_performance import BetaFeatureServiceImprovedPerformance +from zitadel_client.models.beta_feature_service_improved_performance_feature_flag import BetaFeatureServiceImprovedPerformanceFeatureFlag +from zitadel_client.models.beta_feature_service_reset_instance_features_response import BetaFeatureServiceResetInstanceFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_organization_features_request import BetaFeatureServiceResetOrganizationFeaturesRequest +from zitadel_client.models.beta_feature_service_reset_organization_features_response import BetaFeatureServiceResetOrganizationFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_system_features_response import BetaFeatureServiceResetSystemFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_user_features_request import BetaFeatureServiceResetUserFeaturesRequest +from zitadel_client.models.beta_feature_service_reset_user_features_response import BetaFeatureServiceResetUserFeaturesResponse +from zitadel_client.models.beta_feature_service_set_instance_features_request import BetaFeatureServiceSetInstanceFeaturesRequest +from zitadel_client.models.beta_feature_service_set_instance_features_response import BetaFeatureServiceSetInstanceFeaturesResponse +from zitadel_client.models.beta_feature_service_set_organization_features_request import BetaFeatureServiceSetOrganizationFeaturesRequest +from zitadel_client.models.beta_feature_service_set_organization_features_response import BetaFeatureServiceSetOrganizationFeaturesResponse +from zitadel_client.models.beta_feature_service_set_system_features_request import BetaFeatureServiceSetSystemFeaturesRequest +from zitadel_client.models.beta_feature_service_set_system_features_response import BetaFeatureServiceSetSystemFeaturesResponse +from zitadel_client.models.beta_feature_service_set_user_feature_request import BetaFeatureServiceSetUserFeatureRequest +from zitadel_client.models.beta_feature_service_set_user_features_response import BetaFeatureServiceSetUserFeaturesResponse +from zitadel_client.models.beta_feature_service_source import BetaFeatureServiceSource +from zitadel_client.models.beta_oidc_service_any import BetaOIDCServiceAny +from zitadel_client.models.beta_oidc_service_auth_request import BetaOIDCServiceAuthRequest +from zitadel_client.models.beta_oidc_service_authorization_error import BetaOIDCServiceAuthorizationError +from zitadel_client.models.beta_oidc_service_connect_error import BetaOIDCServiceConnectError +from zitadel_client.models.beta_oidc_service_create_callback_request import BetaOIDCServiceCreateCallbackRequest +from zitadel_client.models.beta_oidc_service_create_callback_response import BetaOIDCServiceCreateCallbackResponse +from zitadel_client.models.beta_oidc_service_details import BetaOIDCServiceDetails +from zitadel_client.models.beta_oidc_service_error_reason import BetaOIDCServiceErrorReason +from zitadel_client.models.beta_oidc_service_get_auth_request_request import BetaOIDCServiceGetAuthRequestRequest +from zitadel_client.models.beta_oidc_service_get_auth_request_response import BetaOIDCServiceGetAuthRequestResponse +from zitadel_client.models.beta_oidc_service_prompt import BetaOIDCServicePrompt +from zitadel_client.models.beta_oidc_service_session import BetaOIDCServiceSession +from zitadel_client.models.beta_organization_service_add_human_user_request import BetaOrganizationServiceAddHumanUserRequest +from zitadel_client.models.beta_organization_service_add_organization_request import BetaOrganizationServiceAddOrganizationRequest +from zitadel_client.models.beta_organization_service_add_organization_response import BetaOrganizationServiceAddOrganizationResponse +from zitadel_client.models.beta_organization_service_admin import BetaOrganizationServiceAdmin +from zitadel_client.models.beta_organization_service_any import BetaOrganizationServiceAny +from zitadel_client.models.beta_organization_service_connect_error import BetaOrganizationServiceConnectError +from zitadel_client.models.beta_organization_service_created_admin import BetaOrganizationServiceCreatedAdmin +from zitadel_client.models.beta_organization_service_details import BetaOrganizationServiceDetails +from zitadel_client.models.beta_organization_service_gender import BetaOrganizationServiceGender +from zitadel_client.models.beta_organization_service_hashed_password import BetaOrganizationServiceHashedPassword +from zitadel_client.models.beta_organization_service_idp_link import BetaOrganizationServiceIDPLink +from zitadel_client.models.beta_organization_service_organization import BetaOrganizationServiceOrganization +from zitadel_client.models.beta_organization_service_password import BetaOrganizationServicePassword +from zitadel_client.models.beta_organization_service_send_email_verification_code import BetaOrganizationServiceSendEmailVerificationCode +from zitadel_client.models.beta_organization_service_set_human_email import BetaOrganizationServiceSetHumanEmail +from zitadel_client.models.beta_organization_service_set_human_phone import BetaOrganizationServiceSetHumanPhone +from zitadel_client.models.beta_organization_service_set_human_profile import BetaOrganizationServiceSetHumanProfile +from zitadel_client.models.beta_organization_service_set_metadata_entry import BetaOrganizationServiceSetMetadataEntry +from zitadel_client.models.beta_session_service_any import BetaSessionServiceAny +from zitadel_client.models.beta_session_service_challenges import BetaSessionServiceChallenges +from zitadel_client.models.beta_session_service_check_idp_intent import BetaSessionServiceCheckIDPIntent +from zitadel_client.models.beta_session_service_check_otp import BetaSessionServiceCheckOTP +from zitadel_client.models.beta_session_service_check_password import BetaSessionServiceCheckPassword +from zitadel_client.models.beta_session_service_check_totp import BetaSessionServiceCheckTOTP +from zitadel_client.models.beta_session_service_check_user import BetaSessionServiceCheckUser +from zitadel_client.models.beta_session_service_check_web_auth_n import BetaSessionServiceCheckWebAuthN +from zitadel_client.models.beta_session_service_checks import BetaSessionServiceChecks +from zitadel_client.models.beta_session_service_connect_error import BetaSessionServiceConnectError +from zitadel_client.models.beta_session_service_create_session_request import BetaSessionServiceCreateSessionRequest +from zitadel_client.models.beta_session_service_create_session_response import BetaSessionServiceCreateSessionResponse +from zitadel_client.models.beta_session_service_creation_date_query import BetaSessionServiceCreationDateQuery +from zitadel_client.models.beta_session_service_delete_session_request import BetaSessionServiceDeleteSessionRequest +from zitadel_client.models.beta_session_service_delete_session_response import BetaSessionServiceDeleteSessionResponse +from zitadel_client.models.beta_session_service_details import BetaSessionServiceDetails +from zitadel_client.models.beta_session_service_factors import BetaSessionServiceFactors +from zitadel_client.models.beta_session_service_get_session_request import BetaSessionServiceGetSessionRequest +from zitadel_client.models.beta_session_service_get_session_response import BetaSessionServiceGetSessionResponse +from zitadel_client.models.beta_session_service_header_values import BetaSessionServiceHeaderValues +from zitadel_client.models.beta_session_service_ids_query import BetaSessionServiceIDsQuery +from zitadel_client.models.beta_session_service_intent_factor import BetaSessionServiceIntentFactor +from zitadel_client.models.beta_session_service_list_details import BetaSessionServiceListDetails +from zitadel_client.models.beta_session_service_list_query import BetaSessionServiceListQuery +from zitadel_client.models.beta_session_service_list_sessions_request import BetaSessionServiceListSessionsRequest +from zitadel_client.models.beta_session_service_list_sessions_response import BetaSessionServiceListSessionsResponse +from zitadel_client.models.beta_session_service_otp_email import BetaSessionServiceOTPEmail +from zitadel_client.models.beta_session_service_otp_factor import BetaSessionServiceOTPFactor +from zitadel_client.models.beta_session_service_otpsms import BetaSessionServiceOTPSMS +from zitadel_client.models.beta_session_service_password_factor import BetaSessionServicePasswordFactor +from zitadel_client.models.beta_session_service_request_challenges import BetaSessionServiceRequestChallenges +from zitadel_client.models.beta_session_service_search_query import BetaSessionServiceSearchQuery +from zitadel_client.models.beta_session_service_send_code import BetaSessionServiceSendCode +from zitadel_client.models.beta_session_service_session import BetaSessionServiceSession +from zitadel_client.models.beta_session_service_session_field_name import BetaSessionServiceSessionFieldName +from zitadel_client.models.beta_session_service_set_session_request import BetaSessionServiceSetSessionRequest +from zitadel_client.models.beta_session_service_set_session_response import BetaSessionServiceSetSessionResponse +from zitadel_client.models.beta_session_service_totp_factor import BetaSessionServiceTOTPFactor +from zitadel_client.models.beta_session_service_timestamp_query_method import BetaSessionServiceTimestampQueryMethod +from zitadel_client.models.beta_session_service_user_agent import BetaSessionServiceUserAgent +from zitadel_client.models.beta_session_service_user_factor import BetaSessionServiceUserFactor +from zitadel_client.models.beta_session_service_user_id_query import BetaSessionServiceUserIDQuery +from zitadel_client.models.beta_session_service_user_verification_requirement import BetaSessionServiceUserVerificationRequirement +from zitadel_client.models.beta_session_service_value import BetaSessionServiceValue +from zitadel_client.models.beta_session_service_web_auth_n import BetaSessionServiceWebAuthN +from zitadel_client.models.beta_session_service_web_auth_n_factor import BetaSessionServiceWebAuthNFactor +from zitadel_client.models.beta_settings_service_any import BetaSettingsServiceAny +from zitadel_client.models.beta_settings_service_branding_settings import BetaSettingsServiceBrandingSettings +from zitadel_client.models.beta_settings_service_connect_error import BetaSettingsServiceConnectError +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_domain_settings import BetaSettingsServiceDomainSettings +from zitadel_client.models.beta_settings_service_embedded_iframe_settings import BetaSettingsServiceEmbeddedIframeSettings +from zitadel_client.models.beta_settings_service_get_active_identity_providers_request import BetaSettingsServiceGetActiveIdentityProvidersRequest +from zitadel_client.models.beta_settings_service_get_active_identity_providers_response import BetaSettingsServiceGetActiveIdentityProvidersResponse +from zitadel_client.models.beta_settings_service_get_branding_settings_request import BetaSettingsServiceGetBrandingSettingsRequest +from zitadel_client.models.beta_settings_service_get_branding_settings_response import BetaSettingsServiceGetBrandingSettingsResponse +from zitadel_client.models.beta_settings_service_get_domain_settings_request import BetaSettingsServiceGetDomainSettingsRequest +from zitadel_client.models.beta_settings_service_get_domain_settings_response import BetaSettingsServiceGetDomainSettingsResponse +from zitadel_client.models.beta_settings_service_get_general_settings_response import BetaSettingsServiceGetGeneralSettingsResponse +from zitadel_client.models.beta_settings_service_get_legal_and_support_settings_request import BetaSettingsServiceGetLegalAndSupportSettingsRequest +from zitadel_client.models.beta_settings_service_get_legal_and_support_settings_response import BetaSettingsServiceGetLegalAndSupportSettingsResponse +from zitadel_client.models.beta_settings_service_get_lockout_settings_request import BetaSettingsServiceGetLockoutSettingsRequest +from zitadel_client.models.beta_settings_service_get_lockout_settings_response import BetaSettingsServiceGetLockoutSettingsResponse +from zitadel_client.models.beta_settings_service_get_login_settings_request import BetaSettingsServiceGetLoginSettingsRequest +from zitadel_client.models.beta_settings_service_get_login_settings_response import BetaSettingsServiceGetLoginSettingsResponse +from zitadel_client.models.beta_settings_service_get_password_complexity_settings_request import BetaSettingsServiceGetPasswordComplexitySettingsRequest +from zitadel_client.models.beta_settings_service_get_password_complexity_settings_response import BetaSettingsServiceGetPasswordComplexitySettingsResponse +from zitadel_client.models.beta_settings_service_get_password_expiry_settings_request import BetaSettingsServiceGetPasswordExpirySettingsRequest +from zitadel_client.models.beta_settings_service_get_password_expiry_settings_response import BetaSettingsServiceGetPasswordExpirySettingsResponse +from zitadel_client.models.beta_settings_service_get_security_settings_response import BetaSettingsServiceGetSecuritySettingsResponse +from zitadel_client.models.beta_settings_service_identity_provider import BetaSettingsServiceIdentityProvider +from zitadel_client.models.beta_settings_service_identity_provider_type import BetaSettingsServiceIdentityProviderType +from zitadel_client.models.beta_settings_service_legal_and_support_settings import BetaSettingsServiceLegalAndSupportSettings +from zitadel_client.models.beta_settings_service_list_details import BetaSettingsServiceListDetails +from zitadel_client.models.beta_settings_service_lockout_settings import BetaSettingsServiceLockoutSettings +from zitadel_client.models.beta_settings_service_login_settings import BetaSettingsServiceLoginSettings +from zitadel_client.models.beta_settings_service_multi_factor_type import BetaSettingsServiceMultiFactorType +from zitadel_client.models.beta_settings_service_passkeys_type import BetaSettingsServicePasskeysType +from zitadel_client.models.beta_settings_service_password_complexity_settings import BetaSettingsServicePasswordComplexitySettings +from zitadel_client.models.beta_settings_service_password_expiry_settings import BetaSettingsServicePasswordExpirySettings +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType +from zitadel_client.models.beta_settings_service_second_factor_type import BetaSettingsServiceSecondFactorType +from zitadel_client.models.beta_settings_service_security_settings import BetaSettingsServiceSecuritySettings +from zitadel_client.models.beta_settings_service_set_security_settings_request import BetaSettingsServiceSetSecuritySettingsRequest +from zitadel_client.models.beta_settings_service_set_security_settings_response import BetaSettingsServiceSetSecuritySettingsResponse +from zitadel_client.models.beta_settings_service_theme import BetaSettingsServiceTheme +from zitadel_client.models.beta_settings_service_theme_mode import BetaSettingsServiceThemeMode +from zitadel_client.models.beta_user_service_access_token_type import BetaUserServiceAccessTokenType +from zitadel_client.models.beta_user_service_add_human_user_request import BetaUserServiceAddHumanUserRequest +from zitadel_client.models.beta_user_service_add_human_user_response import BetaUserServiceAddHumanUserResponse +from zitadel_client.models.beta_user_service_add_idp_link_request import BetaUserServiceAddIDPLinkRequest +from zitadel_client.models.beta_user_service_add_idp_link_response import BetaUserServiceAddIDPLinkResponse +from zitadel_client.models.beta_user_service_add_otp_email_request import BetaUserServiceAddOTPEmailRequest +from zitadel_client.models.beta_user_service_add_otp_email_response import BetaUserServiceAddOTPEmailResponse +from zitadel_client.models.beta_user_service_add_otpsms_request import BetaUserServiceAddOTPSMSRequest +from zitadel_client.models.beta_user_service_add_otpsms_response import BetaUserServiceAddOTPSMSResponse +from zitadel_client.models.beta_user_service_and_query import BetaUserServiceAndQuery +from zitadel_client.models.beta_user_service_any import BetaUserServiceAny +from zitadel_client.models.beta_user_service_authentication_method_type import BetaUserServiceAuthenticationMethodType +from zitadel_client.models.beta_user_service_connect_error import BetaUserServiceConnectError +from zitadel_client.models.beta_user_service_create_passkey_registration_link_request import BetaUserServiceCreatePasskeyRegistrationLinkRequest +from zitadel_client.models.beta_user_service_create_passkey_registration_link_response import BetaUserServiceCreatePasskeyRegistrationLinkResponse +from zitadel_client.models.beta_user_service_deactivate_user_request import BetaUserServiceDeactivateUserRequest +from zitadel_client.models.beta_user_service_deactivate_user_response import BetaUserServiceDeactivateUserResponse +from zitadel_client.models.beta_user_service_delete_user_request import BetaUserServiceDeleteUserRequest +from zitadel_client.models.beta_user_service_delete_user_response import BetaUserServiceDeleteUserResponse +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from zitadel_client.models.beta_user_service_display_name_query import BetaUserServiceDisplayNameQuery +from zitadel_client.models.beta_user_service_email_query import BetaUserServiceEmailQuery +from zitadel_client.models.beta_user_service_first_name_query import BetaUserServiceFirstNameQuery +from zitadel_client.models.beta_user_service_gender import BetaUserServiceGender +from zitadel_client.models.beta_user_service_get_user_by_id_request import BetaUserServiceGetUserByIDRequest +from zitadel_client.models.beta_user_service_get_user_by_id_response import BetaUserServiceGetUserByIDResponse +from zitadel_client.models.beta_user_service_hashed_password import BetaUserServiceHashedPassword +from zitadel_client.models.beta_user_service_human_email import BetaUserServiceHumanEmail +from zitadel_client.models.beta_user_service_human_phone import BetaUserServiceHumanPhone +from zitadel_client.models.beta_user_service_human_profile import BetaUserServiceHumanProfile +from zitadel_client.models.beta_user_service_human_user import BetaUserServiceHumanUser +from zitadel_client.models.beta_user_service_idp_information import BetaUserServiceIDPInformation +from zitadel_client.models.beta_user_service_idp_intent import BetaUserServiceIDPIntent +from zitadel_client.models.beta_user_service_idpldap_access_information import BetaUserServiceIDPLDAPAccessInformation +from zitadel_client.models.beta_user_service_idp_link import BetaUserServiceIDPLink +from zitadel_client.models.beta_user_service_idpo_auth_access_information import BetaUserServiceIDPOAuthAccessInformation +from zitadel_client.models.beta_user_service_idpsaml_access_information import BetaUserServiceIDPSAMLAccessInformation +from zitadel_client.models.beta_user_service_in_user_emails_query import BetaUserServiceInUserEmailsQuery +from zitadel_client.models.beta_user_service_in_user_id_query import BetaUserServiceInUserIDQuery +from zitadel_client.models.beta_user_service_ldap_credentials import BetaUserServiceLDAPCredentials +from zitadel_client.models.beta_user_service_last_name_query import BetaUserServiceLastNameQuery +from zitadel_client.models.beta_user_service_list_authentication_method_types_request import BetaUserServiceListAuthenticationMethodTypesRequest +from zitadel_client.models.beta_user_service_list_authentication_method_types_response import BetaUserServiceListAuthenticationMethodTypesResponse +from zitadel_client.models.beta_user_service_list_details import BetaUserServiceListDetails +from zitadel_client.models.beta_user_service_list_query import BetaUserServiceListQuery +from zitadel_client.models.beta_user_service_list_users_request import BetaUserServiceListUsersRequest +from zitadel_client.models.beta_user_service_list_users_response import BetaUserServiceListUsersResponse +from zitadel_client.models.beta_user_service_lock_user_request import BetaUserServiceLockUserRequest +from zitadel_client.models.beta_user_service_lock_user_response import BetaUserServiceLockUserResponse +from zitadel_client.models.beta_user_service_login_name_query import BetaUserServiceLoginNameQuery +from zitadel_client.models.beta_user_service_machine_user import BetaUserServiceMachineUser +from zitadel_client.models.beta_user_service_nick_name_query import BetaUserServiceNickNameQuery +from zitadel_client.models.beta_user_service_not_query import BetaUserServiceNotQuery +from zitadel_client.models.beta_user_service_notification_type import BetaUserServiceNotificationType +from zitadel_client.models.beta_user_service_or_query import BetaUserServiceOrQuery +from zitadel_client.models.beta_user_service_organization import BetaUserServiceOrganization +from zitadel_client.models.beta_user_service_organization_id_query import BetaUserServiceOrganizationIdQuery +from zitadel_client.models.beta_user_service_passkey_authenticator import BetaUserServicePasskeyAuthenticator +from zitadel_client.models.beta_user_service_passkey_registration_code import BetaUserServicePasskeyRegistrationCode +from zitadel_client.models.beta_user_service_password import BetaUserServicePassword +from zitadel_client.models.beta_user_service_password_reset_request import BetaUserServicePasswordResetRequest +from zitadel_client.models.beta_user_service_password_reset_response import BetaUserServicePasswordResetResponse +from zitadel_client.models.beta_user_service_phone_query import BetaUserServicePhoneQuery +from zitadel_client.models.beta_user_service_reactivate_user_request import BetaUserServiceReactivateUserRequest +from zitadel_client.models.beta_user_service_reactivate_user_response import BetaUserServiceReactivateUserResponse +from zitadel_client.models.beta_user_service_redirect_urls import BetaUserServiceRedirectURLs +from zitadel_client.models.beta_user_service_register_passkey_request import BetaUserServiceRegisterPasskeyRequest +from zitadel_client.models.beta_user_service_register_passkey_response import BetaUserServiceRegisterPasskeyResponse +from zitadel_client.models.beta_user_service_register_totp_request import BetaUserServiceRegisterTOTPRequest +from zitadel_client.models.beta_user_service_register_totp_response import BetaUserServiceRegisterTOTPResponse +from zitadel_client.models.beta_user_service_register_u2_f_request import BetaUserServiceRegisterU2FRequest +from zitadel_client.models.beta_user_service_register_u2_f_response import BetaUserServiceRegisterU2FResponse +from zitadel_client.models.beta_user_service_remove_otp_email_request import BetaUserServiceRemoveOTPEmailRequest +from zitadel_client.models.beta_user_service_remove_otp_email_response import BetaUserServiceRemoveOTPEmailResponse +from zitadel_client.models.beta_user_service_remove_otpsms_request import BetaUserServiceRemoveOTPSMSRequest +from zitadel_client.models.beta_user_service_remove_otpsms_response import BetaUserServiceRemoveOTPSMSResponse +from zitadel_client.models.beta_user_service_remove_phone_request import BetaUserServiceRemovePhoneRequest +from zitadel_client.models.beta_user_service_remove_phone_response import BetaUserServiceRemovePhoneResponse +from zitadel_client.models.beta_user_service_remove_totp_request import BetaUserServiceRemoveTOTPRequest +from zitadel_client.models.beta_user_service_remove_totp_response import BetaUserServiceRemoveTOTPResponse +from zitadel_client.models.beta_user_service_resend_email_code_request import BetaUserServiceResendEmailCodeRequest +from zitadel_client.models.beta_user_service_resend_email_code_response import BetaUserServiceResendEmailCodeResponse +from zitadel_client.models.beta_user_service_resend_phone_code_request import BetaUserServiceResendPhoneCodeRequest +from zitadel_client.models.beta_user_service_resend_phone_code_response import BetaUserServiceResendPhoneCodeResponse +from zitadel_client.models.beta_user_service_retrieve_identity_provider_intent_request import BetaUserServiceRetrieveIdentityProviderIntentRequest +from zitadel_client.models.beta_user_service_retrieve_identity_provider_intent_response import BetaUserServiceRetrieveIdentityProviderIntentResponse +from zitadel_client.models.beta_user_service_search_query import BetaUserServiceSearchQuery +from zitadel_client.models.beta_user_service_send_email_verification_code import BetaUserServiceSendEmailVerificationCode +from zitadel_client.models.beta_user_service_send_passkey_registration_link import BetaUserServiceSendPasskeyRegistrationLink +from zitadel_client.models.beta_user_service_send_password_reset_link import BetaUserServiceSendPasswordResetLink +from zitadel_client.models.beta_user_service_set_email_request import BetaUserServiceSetEmailRequest +from zitadel_client.models.beta_user_service_set_email_response import BetaUserServiceSetEmailResponse +from zitadel_client.models.beta_user_service_set_human_email import BetaUserServiceSetHumanEmail +from zitadel_client.models.beta_user_service_set_human_phone import BetaUserServiceSetHumanPhone +from zitadel_client.models.beta_user_service_set_human_profile import BetaUserServiceSetHumanProfile +from zitadel_client.models.beta_user_service_set_metadata_entry import BetaUserServiceSetMetadataEntry +from zitadel_client.models.beta_user_service_set_password import BetaUserServiceSetPassword +from zitadel_client.models.beta_user_service_set_password_request import BetaUserServiceSetPasswordRequest +from zitadel_client.models.beta_user_service_set_password_response import BetaUserServiceSetPasswordResponse +from zitadel_client.models.beta_user_service_set_phone_request import BetaUserServiceSetPhoneRequest +from zitadel_client.models.beta_user_service_set_phone_response import BetaUserServiceSetPhoneResponse +from zitadel_client.models.beta_user_service_start_identity_provider_intent_request import BetaUserServiceStartIdentityProviderIntentRequest +from zitadel_client.models.beta_user_service_start_identity_provider_intent_response import BetaUserServiceStartIdentityProviderIntentResponse +from zitadel_client.models.beta_user_service_state_query import BetaUserServiceStateQuery +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from zitadel_client.models.beta_user_service_type import BetaUserServiceType +from zitadel_client.models.beta_user_service_type_query import BetaUserServiceTypeQuery +from zitadel_client.models.beta_user_service_unlock_user_request import BetaUserServiceUnlockUserRequest +from zitadel_client.models.beta_user_service_unlock_user_response import BetaUserServiceUnlockUserResponse +from zitadel_client.models.beta_user_service_update_human_user_request import BetaUserServiceUpdateHumanUserRequest +from zitadel_client.models.beta_user_service_update_human_user_response import BetaUserServiceUpdateHumanUserResponse +from zitadel_client.models.beta_user_service_user import BetaUserServiceUser +from zitadel_client.models.beta_user_service_user_field_name import BetaUserServiceUserFieldName +from zitadel_client.models.beta_user_service_user_name_query import BetaUserServiceUserNameQuery +from zitadel_client.models.beta_user_service_user_state import BetaUserServiceUserState +from zitadel_client.models.beta_user_service_value import BetaUserServiceValue +from zitadel_client.models.beta_user_service_verify_email_request import BetaUserServiceVerifyEmailRequest +from zitadel_client.models.beta_user_service_verify_email_response import BetaUserServiceVerifyEmailResponse +from zitadel_client.models.beta_user_service_verify_passkey_registration_request import BetaUserServiceVerifyPasskeyRegistrationRequest +from zitadel_client.models.beta_user_service_verify_passkey_registration_response import BetaUserServiceVerifyPasskeyRegistrationResponse +from zitadel_client.models.beta_user_service_verify_phone_request import BetaUserServiceVerifyPhoneRequest +from zitadel_client.models.beta_user_service_verify_phone_response import BetaUserServiceVerifyPhoneResponse +from zitadel_client.models.beta_user_service_verify_totp_registration_request import BetaUserServiceVerifyTOTPRegistrationRequest +from zitadel_client.models.beta_user_service_verify_totp_registration_response import BetaUserServiceVerifyTOTPRegistrationResponse +from zitadel_client.models.beta_user_service_verify_u2_f_registration_request import BetaUserServiceVerifyU2FRegistrationRequest +from zitadel_client.models.beta_user_service_verify_u2_f_registration_response import BetaUserServiceVerifyU2FRegistrationResponse +from zitadel_client.models.beta_web_key_service_activate_web_key_request import BetaWebKeyServiceActivateWebKeyRequest +from zitadel_client.models.beta_web_key_service_activate_web_key_response import BetaWebKeyServiceActivateWebKeyResponse +from zitadel_client.models.beta_web_key_service_any import BetaWebKeyServiceAny +from zitadel_client.models.beta_web_key_service_connect_error import BetaWebKeyServiceConnectError +from zitadel_client.models.beta_web_key_service_create_web_key_request import BetaWebKeyServiceCreateWebKeyRequest +from zitadel_client.models.beta_web_key_service_create_web_key_response import BetaWebKeyServiceCreateWebKeyResponse +from zitadel_client.models.beta_web_key_service_delete_web_key_request import BetaWebKeyServiceDeleteWebKeyRequest +from zitadel_client.models.beta_web_key_service_delete_web_key_response import BetaWebKeyServiceDeleteWebKeyResponse +from zitadel_client.models.beta_web_key_service_ecdsa import BetaWebKeyServiceECDSA +from zitadel_client.models.beta_web_key_service_ecdsa_curve import BetaWebKeyServiceECDSACurve +from zitadel_client.models.beta_web_key_service_list_web_keys_response import BetaWebKeyServiceListWebKeysResponse +from zitadel_client.models.beta_web_key_service_rsa import BetaWebKeyServiceRSA +from zitadel_client.models.beta_web_key_service_rsa_bits import BetaWebKeyServiceRSABits +from zitadel_client.models.beta_web_key_service_rsa_hasher import BetaWebKeyServiceRSAHasher +from zitadel_client.models.beta_web_key_service_state import BetaWebKeyServiceState +from zitadel_client.models.beta_web_key_service_web_key import BetaWebKeyServiceWebKey +from zitadel_client.models.creation_date_query import CreationDateQuery +from zitadel_client.models.creation_date_query1 import CreationDateQuery1 +from zitadel_client.models.creator_query import CreatorQuery +from zitadel_client.models.current_password import CurrentPassword +from zitadel_client.models.default_query import DefaultQuery +from zitadel_client.models.deny import Deny +from zitadel_client.models.display_name_query import DisplayNameQuery +from zitadel_client.models.display_name_query1 import DisplayNameQuery1 +from zitadel_client.models.domain_query import DomainQuery +from zitadel_client.models.ecdsa import Ecdsa +from zitadel_client.models.ed25519 import Ed25519 +from zitadel_client.models.email_query import EmailQuery +from zitadel_client.models.email_query1 import EmailQuery1 +from zitadel_client.models.error import Error +from zitadel_client.models.error1 import Error1 +from zitadel_client.models.error2 import Error2 +from zitadel_client.models.event import Event +from zitadel_client.models.event1 import Event1 +from zitadel_client.models.execution_type_filter import ExecutionTypeFilter +from zitadel_client.models.feature_service_any import FeatureServiceAny +from zitadel_client.models.feature_service_connect_error import FeatureServiceConnectError from zitadel_client.models.feature_service_details import FeatureServiceDetails from zitadel_client.models.feature_service_feature_flag import FeatureServiceFeatureFlag +from zitadel_client.models.feature_service_get_instance_features_request import FeatureServiceGetInstanceFeaturesRequest from zitadel_client.models.feature_service_get_instance_features_response import FeatureServiceGetInstanceFeaturesResponse +from zitadel_client.models.feature_service_get_organization_features_request import FeatureServiceGetOrganizationFeaturesRequest from zitadel_client.models.feature_service_get_organization_features_response import FeatureServiceGetOrganizationFeaturesResponse from zitadel_client.models.feature_service_get_system_features_response import FeatureServiceGetSystemFeaturesResponse +from zitadel_client.models.feature_service_get_user_features_request import FeatureServiceGetUserFeaturesRequest from zitadel_client.models.feature_service_get_user_features_response import FeatureServiceGetUserFeaturesResponse from zitadel_client.models.feature_service_improved_performance import FeatureServiceImprovedPerformance from zitadel_client.models.feature_service_improved_performance_feature_flag import FeatureServiceImprovedPerformanceFeatureFlag from zitadel_client.models.feature_service_login_v2 import FeatureServiceLoginV2 from zitadel_client.models.feature_service_login_v2_feature_flag import FeatureServiceLoginV2FeatureFlag -from zitadel_client.models.feature_service_protobuf_any import FeatureServiceProtobufAny from zitadel_client.models.feature_service_reset_instance_features_response import FeatureServiceResetInstanceFeaturesResponse +from zitadel_client.models.feature_service_reset_organization_features_request import FeatureServiceResetOrganizationFeaturesRequest from zitadel_client.models.feature_service_reset_organization_features_response import FeatureServiceResetOrganizationFeaturesResponse from zitadel_client.models.feature_service_reset_system_features_response import FeatureServiceResetSystemFeaturesResponse +from zitadel_client.models.feature_service_reset_user_features_request import FeatureServiceResetUserFeaturesRequest from zitadel_client.models.feature_service_reset_user_features_response import FeatureServiceResetUserFeaturesResponse -from zitadel_client.models.feature_service_rpc_status import FeatureServiceRpcStatus from zitadel_client.models.feature_service_set_instance_features_request import FeatureServiceSetInstanceFeaturesRequest from zitadel_client.models.feature_service_set_instance_features_response import FeatureServiceSetInstanceFeaturesResponse +from zitadel_client.models.feature_service_set_organization_features_request import FeatureServiceSetOrganizationFeaturesRequest from zitadel_client.models.feature_service_set_organization_features_response import FeatureServiceSetOrganizationFeaturesResponse from zitadel_client.models.feature_service_set_system_features_request import FeatureServiceSetSystemFeaturesRequest from zitadel_client.models.feature_service_set_system_features_response import FeatureServiceSetSystemFeaturesResponse +from zitadel_client.models.feature_service_set_user_feature_request import FeatureServiceSetUserFeatureRequest from zitadel_client.models.feature_service_set_user_features_response import FeatureServiceSetUserFeaturesResponse from zitadel_client.models.feature_service_source import FeatureServiceSource +from zitadel_client.models.first_name_query import FirstNameQuery +from zitadel_client.models.first_name_query1 import FirstNameQuery1 +from zitadel_client.models.function import Function +from zitadel_client.models.github import Github +from zitadel_client.models.github_es import GithubEs +from zitadel_client.models.gitlab import Gitlab +from zitadel_client.models.gitlab_self_hosted import GitlabSelfHosted +from zitadel_client.models.google import Google +from zitadel_client.models.group import Group +from zitadel_client.models.hashed_password import HashedPassword +from zitadel_client.models.hashed_password1 import HashedPassword1 +from zitadel_client.models.hashed_password2 import HashedPassword2 +from zitadel_client.models.hashed_password3 import HashedPassword3 +from zitadel_client.models.human import Human +from zitadel_client.models.human1 import Human1 +from zitadel_client.models.human2 import Human2 +from zitadel_client.models.human3 import Human3 +from zitadel_client.models.id_query import IdQuery +from zitadel_client.models.identity_provider_service_any import IdentityProviderServiceAny from zitadel_client.models.identity_provider_service_apple_config import IdentityProviderServiceAppleConfig from zitadel_client.models.identity_provider_service_auto_linking_option import IdentityProviderServiceAutoLinkingOption from zitadel_client.models.identity_provider_service_azure_ad_config import IdentityProviderServiceAzureADConfig from zitadel_client.models.identity_provider_service_azure_ad_tenant import IdentityProviderServiceAzureADTenant from zitadel_client.models.identity_provider_service_azure_ad_tenant_type import IdentityProviderServiceAzureADTenantType +from zitadel_client.models.identity_provider_service_connect_error import IdentityProviderServiceConnectError from zitadel_client.models.identity_provider_service_details import IdentityProviderServiceDetails from zitadel_client.models.identity_provider_service_generic_oidc_config import IdentityProviderServiceGenericOIDCConfig +from zitadel_client.models.identity_provider_service_get_idpby_id_request import IdentityProviderServiceGetIDPByIDRequest from zitadel_client.models.identity_provider_service_get_idpby_id_response import IdentityProviderServiceGetIDPByIDResponse from zitadel_client.models.identity_provider_service_git_hub_config import IdentityProviderServiceGitHubConfig from zitadel_client.models.identity_provider_service_git_hub_enterprise_server_config import IdentityProviderServiceGitHubEnterpriseServerConfig @@ -91,30 +442,85 @@ from zitadel_client.models.identity_provider_service_ldap_config import IdentityProviderServiceLDAPConfig from zitadel_client.models.identity_provider_service_o_auth_config import IdentityProviderServiceOAuthConfig from zitadel_client.models.identity_provider_service_options import IdentityProviderServiceOptions -from zitadel_client.models.identity_provider_service_protobuf_any import IdentityProviderServiceProtobufAny -from zitadel_client.models.identity_provider_service_rpc_status import IdentityProviderServiceRpcStatus from zitadel_client.models.identity_provider_service_saml_binding import IdentityProviderServiceSAMLBinding from zitadel_client.models.identity_provider_service_saml_config import IdentityProviderServiceSAMLConfig from zitadel_client.models.identity_provider_service_saml_name_id_format import IdentityProviderServiceSAMLNameIDFormat +from zitadel_client.models.idp_intent import IdpIntent +from zitadel_client.models.idp_intent1 import IdpIntent1 +from zitadel_client.models.ids_query import IdsQuery +from zitadel_client.models.ids_query1 import IdsQuery1 +from zitadel_client.models.in_conditions_filter import InConditionsFilter +from zitadel_client.models.in_target_ids_filter import InTargetIdsFilter +from zitadel_client.models.in_user_emails_query import InUserEmailsQuery +from zitadel_client.models.in_user_emails_query1 import InUserEmailsQuery1 +from zitadel_client.models.in_user_ids_query import InUserIdsQuery +from zitadel_client.models.in_user_ids_query1 import InUserIdsQuery1 +from zitadel_client.models.instance import Instance +from zitadel_client.models.is_verified import IsVerified +from zitadel_client.models.jwt import Jwt +from zitadel_client.models.last_name_query import LastNameQuery +from zitadel_client.models.last_name_query1 import LastNameQuery1 +from zitadel_client.models.ldap import Ldap +from zitadel_client.models.ldap1 import Ldap1 +from zitadel_client.models.ldap2 import Ldap2 +from zitadel_client.models.ldap3 import Ldap3 +from zitadel_client.models.ldap4 import Ldap4 +from zitadel_client.models.login_name import LoginName +from zitadel_client.models.login_name_query import LoginNameQuery +from zitadel_client.models.login_name_query1 import LoginNameQuery1 +from zitadel_client.models.machine import Machine +from zitadel_client.models.machine1 import Machine1 +from zitadel_client.models.method import Method +from zitadel_client.models.name_query import NameQuery +from zitadel_client.models.nick_name_query import NickNameQuery +from zitadel_client.models.nick_name_query1 import NickNameQuery1 +from zitadel_client.models.no_op200_response import NoOp200Response +from zitadel_client.models.no_op200_response1 import NoOp200Response1 +from zitadel_client.models.no_op200_response10 import NoOp200Response10 +from zitadel_client.models.no_op200_response11 import NoOp200Response11 +from zitadel_client.models.no_op200_response2 import NoOp200Response2 +from zitadel_client.models.no_op200_response3 import NoOp200Response3 +from zitadel_client.models.no_op200_response4 import NoOp200Response4 +from zitadel_client.models.no_op200_response5 import NoOp200Response5 +from zitadel_client.models.no_op200_response6 import NoOp200Response6 +from zitadel_client.models.no_op200_response7 import NoOp200Response7 +from zitadel_client.models.no_op200_response8 import NoOp200Response8 +from zitadel_client.models.no_op200_response9 import NoOp200Response9 +from zitadel_client.models.not_query import NotQuery +from zitadel_client.models.not_query1 import NotQuery1 +from zitadel_client.models.oidc_service_any import OIDCServiceAny from zitadel_client.models.oidc_service_auth_request import OIDCServiceAuthRequest from zitadel_client.models.oidc_service_authorization_error import OIDCServiceAuthorizationError from zitadel_client.models.oidc_service_authorize_or_deny_device_authorization_request import OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest +from zitadel_client.models.oidc_service_connect_error import OIDCServiceConnectError from zitadel_client.models.oidc_service_create_callback_request import OIDCServiceCreateCallbackRequest from zitadel_client.models.oidc_service_create_callback_response import OIDCServiceCreateCallbackResponse from zitadel_client.models.oidc_service_details import OIDCServiceDetails from zitadel_client.models.oidc_service_device_authorization_request import OIDCServiceDeviceAuthorizationRequest from zitadel_client.models.oidc_service_error_reason import OIDCServiceErrorReason +from zitadel_client.models.oidc_service_get_auth_request_request import OIDCServiceGetAuthRequestRequest from zitadel_client.models.oidc_service_get_auth_request_response import OIDCServiceGetAuthRequestResponse +from zitadel_client.models.oidc_service_get_device_authorization_request_request import OIDCServiceGetDeviceAuthorizationRequestRequest from zitadel_client.models.oidc_service_get_device_authorization_request_response import OIDCServiceGetDeviceAuthorizationRequestResponse from zitadel_client.models.oidc_service_prompt import OIDCServicePrompt -from zitadel_client.models.oidc_service_protobuf_any import OIDCServiceProtobufAny -from zitadel_client.models.oidc_service_rpc_status import OIDCServiceRpcStatus from zitadel_client.models.oidc_service_session import OIDCServiceSession +from zitadel_client.models.oauth import Oauth +from zitadel_client.models.oauth1 import Oauth1 +from zitadel_client.models.oauth2 import Oauth2 +from zitadel_client.models.oidc import Oidc +from zitadel_client.models.or_query import OrQuery +from zitadel_client.models.or_query1 import OrQuery1 +from zitadel_client.models.org_domain import OrgDomain +from zitadel_client.models.org_id import OrgId +from zitadel_client.models.organization_id_query import OrganizationIdQuery +from zitadel_client.models.organization_id_query1 import OrganizationIdQuery1 from zitadel_client.models.organization_service_add_human_user_request import OrganizationServiceAddHumanUserRequest from zitadel_client.models.organization_service_add_organization_request import OrganizationServiceAddOrganizationRequest -from zitadel_client.models.organization_service_add_organization_request_admin import OrganizationServiceAddOrganizationRequestAdmin from zitadel_client.models.organization_service_add_organization_response import OrganizationServiceAddOrganizationResponse -from zitadel_client.models.organization_service_add_organization_response_created_admin import OrganizationServiceAddOrganizationResponseCreatedAdmin +from zitadel_client.models.organization_service_admin import OrganizationServiceAdmin +from zitadel_client.models.organization_service_any import OrganizationServiceAny +from zitadel_client.models.organization_service_connect_error import OrganizationServiceConnectError +from zitadel_client.models.organization_service_created_admin import OrganizationServiceCreatedAdmin from zitadel_client.models.organization_service_details import OrganizationServiceDetails from zitadel_client.models.organization_service_gender import OrganizationServiceGender from zitadel_client.models.organization_service_hashed_password import OrganizationServiceHashedPassword @@ -123,6 +529,7 @@ from zitadel_client.models.organization_service_list_organizations_request import OrganizationServiceListOrganizationsRequest from zitadel_client.models.organization_service_list_organizations_response import OrganizationServiceListOrganizationsResponse from zitadel_client.models.organization_service_list_query import OrganizationServiceListQuery +from zitadel_client.models.organization_service_organization import OrganizationServiceOrganization from zitadel_client.models.organization_service_organization_domain_query import OrganizationServiceOrganizationDomainQuery from zitadel_client.models.organization_service_organization_field_name import OrganizationServiceOrganizationFieldName from zitadel_client.models.organization_service_organization_id_query import OrganizationServiceOrganizationIDQuery @@ -130,8 +537,6 @@ from zitadel_client.models.organization_service_organization_state import OrganizationServiceOrganizationState from zitadel_client.models.organization_service_organization_state_query import OrganizationServiceOrganizationStateQuery from zitadel_client.models.organization_service_password import OrganizationServicePassword -from zitadel_client.models.organization_service_protobuf_any import OrganizationServiceProtobufAny -from zitadel_client.models.organization_service_rpc_status import OrganizationServiceRpcStatus from zitadel_client.models.organization_service_search_query import OrganizationServiceSearchQuery from zitadel_client.models.organization_service_send_email_verification_code import OrganizationServiceSendEmailVerificationCode from zitadel_client.models.organization_service_set_human_email import OrganizationServiceSetHumanEmail @@ -139,19 +544,75 @@ from zitadel_client.models.organization_service_set_human_profile import OrganizationServiceSetHumanProfile from zitadel_client.models.organization_service_set_metadata_entry import OrganizationServiceSetMetadataEntry from zitadel_client.models.organization_service_text_query_method import OrganizationServiceTextQueryMethod +from zitadel_client.models.otp import Otp +from zitadel_client.models.otp_email import OtpEmail +from zitadel_client.models.otp_sms import OtpSms +from zitadel_client.models.password import Password +from zitadel_client.models.password1 import Password1 +from zitadel_client.models.password2 import Password2 +from zitadel_client.models.password3 import Password3 +from zitadel_client.models.phone_query import PhoneQuery +from zitadel_client.models.phone_query1 import PhoneQuery1 +from zitadel_client.models.post import Post +from zitadel_client.models.post_form import PostForm +from zitadel_client.models.redirect import Redirect +from zitadel_client.models.request import Request +from zitadel_client.models.response import Response +from zitadel_client.models.rest_async import RestAsync +from zitadel_client.models.rest_call import RestCall +from zitadel_client.models.rest_webhook import RestWebhook +from zitadel_client.models.return_code import ReturnCode +from zitadel_client.models.return_code1 import ReturnCode1 +from zitadel_client.models.return_code10 import ReturnCode10 +from zitadel_client.models.return_code11 import ReturnCode11 +from zitadel_client.models.return_code12 import ReturnCode12 +from zitadel_client.models.return_code13 import ReturnCode13 +from zitadel_client.models.return_code14 import ReturnCode14 +from zitadel_client.models.return_code2 import ReturnCode2 +from zitadel_client.models.return_code3 import ReturnCode3 +from zitadel_client.models.return_code4 import ReturnCode4 +from zitadel_client.models.return_code5 import ReturnCode5 +from zitadel_client.models.return_code6 import ReturnCode6 +from zitadel_client.models.return_code7 import ReturnCode7 +from zitadel_client.models.return_code8 import ReturnCode8 +from zitadel_client.models.return_code9 import ReturnCode9 +from zitadel_client.models.rsa import Rsa +from zitadel_client.models.saml_service_any import SAMLServiceAny from zitadel_client.models.saml_service_authorization_error import SAMLServiceAuthorizationError +from zitadel_client.models.saml_service_connect_error import SAMLServiceConnectError from zitadel_client.models.saml_service_create_response_request import SAMLServiceCreateResponseRequest from zitadel_client.models.saml_service_create_response_response import SAMLServiceCreateResponseResponse from zitadel_client.models.saml_service_details import SAMLServiceDetails from zitadel_client.models.saml_service_error_reason import SAMLServiceErrorReason +from zitadel_client.models.saml_service_get_saml_request_request import SAMLServiceGetSAMLRequestRequest from zitadel_client.models.saml_service_get_saml_request_response import SAMLServiceGetSAMLRequestResponse from zitadel_client.models.saml_service_post_response import SAMLServicePostResponse -from zitadel_client.models.saml_service_protobuf_any import SAMLServiceProtobufAny -from zitadel_client.models.saml_service_rpc_status import SAMLServiceRpcStatus from zitadel_client.models.saml_service_saml_request import SAMLServiceSAMLRequest from zitadel_client.models.saml_service_session import SAMLServiceSession +from zitadel_client.models.saml import Saml +from zitadel_client.models.saml1 import Saml1 +from zitadel_client.models.saml2 import Saml2 +from zitadel_client.models.send_code import SendCode +from zitadel_client.models.send_code1 import SendCode1 +from zitadel_client.models.send_code10 import SendCode10 +from zitadel_client.models.send_code2 import SendCode2 +from zitadel_client.models.send_code3 import SendCode3 +from zitadel_client.models.send_code4 import SendCode4 +from zitadel_client.models.send_code5 import SendCode5 +from zitadel_client.models.send_code6 import SendCode6 +from zitadel_client.models.send_code7 import SendCode7 +from zitadel_client.models.send_code8 import SendCode8 +from zitadel_client.models.send_code9 import SendCode9 +from zitadel_client.models.send_link import SendLink +from zitadel_client.models.send_link1 import SendLink1 +from zitadel_client.models.send_link2 import SendLink2 +from zitadel_client.models.send_link3 import SendLink3 +from zitadel_client.models.service import Service +from zitadel_client.models.session import Session +from zitadel_client.models.session1 import Session1 +from zitadel_client.models.session2 import Session2 +from zitadel_client.models.session_service_any import SessionServiceAny from zitadel_client.models.session_service_challenges import SessionServiceChallenges -from zitadel_client.models.session_service_challenges_web_auth_n import SessionServiceChallengesWebAuthN from zitadel_client.models.session_service_check_idp_intent import SessionServiceCheckIDPIntent from zitadel_client.models.session_service_check_otp import SessionServiceCheckOTP from zitadel_client.models.session_service_check_password import SessionServiceCheckPassword @@ -159,6 +620,7 @@ from zitadel_client.models.session_service_check_user import SessionServiceCheckUser from zitadel_client.models.session_service_check_web_auth_n import SessionServiceCheckWebAuthN from zitadel_client.models.session_service_checks import SessionServiceChecks +from zitadel_client.models.session_service_connect_error import SessionServiceConnectError from zitadel_client.models.session_service_create_session_request import SessionServiceCreateSessionRequest from zitadel_client.models.session_service_create_session_response import SessionServiceCreateSessionResponse from zitadel_client.models.session_service_creation_date_query import SessionServiceCreationDateQuery @@ -167,23 +629,22 @@ from zitadel_client.models.session_service_delete_session_response import SessionServiceDeleteSessionResponse from zitadel_client.models.session_service_details import SessionServiceDetails from zitadel_client.models.session_service_factors import SessionServiceFactors +from zitadel_client.models.session_service_get_session_request import SessionServiceGetSessionRequest from zitadel_client.models.session_service_get_session_response import SessionServiceGetSessionResponse +from zitadel_client.models.session_service_header_values import SessionServiceHeaderValues from zitadel_client.models.session_service_ids_query import SessionServiceIDsQuery from zitadel_client.models.session_service_intent_factor import SessionServiceIntentFactor from zitadel_client.models.session_service_list_details import SessionServiceListDetails from zitadel_client.models.session_service_list_query import SessionServiceListQuery from zitadel_client.models.session_service_list_sessions_request import SessionServiceListSessionsRequest from zitadel_client.models.session_service_list_sessions_response import SessionServiceListSessionsResponse -from zitadel_client.models.session_service_otp_email_send_code import SessionServiceOTPEmailSendCode +from zitadel_client.models.session_service_otp_email import SessionServiceOTPEmail from zitadel_client.models.session_service_otp_factor import SessionServiceOTPFactor +from zitadel_client.models.session_service_otpsms import SessionServiceOTPSMS from zitadel_client.models.session_service_password_factor import SessionServicePasswordFactor -from zitadel_client.models.session_service_protobuf_any import SessionServiceProtobufAny from zitadel_client.models.session_service_request_challenges import SessionServiceRequestChallenges -from zitadel_client.models.session_service_request_challenges_otp_email import SessionServiceRequestChallengesOTPEmail -from zitadel_client.models.session_service_request_challenges_otpsms import SessionServiceRequestChallengesOTPSMS -from zitadel_client.models.session_service_request_challenges_web_auth_n import SessionServiceRequestChallengesWebAuthN -from zitadel_client.models.session_service_rpc_status import SessionServiceRpcStatus from zitadel_client.models.session_service_search_query import SessionServiceSearchQuery +from zitadel_client.models.session_service_send_code import SessionServiceSendCode from zitadel_client.models.session_service_session import SessionServiceSession from zitadel_client.models.session_service_session_field_name import SessionServiceSessionFieldName from zitadel_client.models.session_service_set_session_request import SessionServiceSetSessionRequest @@ -191,25 +652,36 @@ from zitadel_client.models.session_service_totp_factor import SessionServiceTOTPFactor from zitadel_client.models.session_service_timestamp_query_method import SessionServiceTimestampQueryMethod from zitadel_client.models.session_service_user_agent import SessionServiceUserAgent -from zitadel_client.models.session_service_user_agent_header_values import SessionServiceUserAgentHeaderValues from zitadel_client.models.session_service_user_agent_query import SessionServiceUserAgentQuery from zitadel_client.models.session_service_user_factor import SessionServiceUserFactor from zitadel_client.models.session_service_user_id_query import SessionServiceUserIDQuery from zitadel_client.models.session_service_user_verification_requirement import SessionServiceUserVerificationRequirement +from zitadel_client.models.session_service_value import SessionServiceValue +from zitadel_client.models.session_service_web_auth_n import SessionServiceWebAuthN from zitadel_client.models.session_service_web_auth_n_factor import SessionServiceWebAuthNFactor +from zitadel_client.models.settings_service_any import SettingsServiceAny from zitadel_client.models.settings_service_auto_linking_option import SettingsServiceAutoLinkingOption from zitadel_client.models.settings_service_branding_settings import SettingsServiceBrandingSettings +from zitadel_client.models.settings_service_connect_error import SettingsServiceConnectError from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_domain_settings import SettingsServiceDomainSettings from zitadel_client.models.settings_service_embedded_iframe_settings import SettingsServiceEmbeddedIframeSettings +from zitadel_client.models.settings_service_get_active_identity_providers_request import SettingsServiceGetActiveIdentityProvidersRequest from zitadel_client.models.settings_service_get_active_identity_providers_response import SettingsServiceGetActiveIdentityProvidersResponse +from zitadel_client.models.settings_service_get_branding_settings_request import SettingsServiceGetBrandingSettingsRequest from zitadel_client.models.settings_service_get_branding_settings_response import SettingsServiceGetBrandingSettingsResponse +from zitadel_client.models.settings_service_get_domain_settings_request import SettingsServiceGetDomainSettingsRequest from zitadel_client.models.settings_service_get_domain_settings_response import SettingsServiceGetDomainSettingsResponse from zitadel_client.models.settings_service_get_general_settings_response import SettingsServiceGetGeneralSettingsResponse +from zitadel_client.models.settings_service_get_legal_and_support_settings_request import SettingsServiceGetLegalAndSupportSettingsRequest from zitadel_client.models.settings_service_get_legal_and_support_settings_response import SettingsServiceGetLegalAndSupportSettingsResponse +from zitadel_client.models.settings_service_get_lockout_settings_request import SettingsServiceGetLockoutSettingsRequest from zitadel_client.models.settings_service_get_lockout_settings_response import SettingsServiceGetLockoutSettingsResponse +from zitadel_client.models.settings_service_get_login_settings_request import SettingsServiceGetLoginSettingsRequest from zitadel_client.models.settings_service_get_login_settings_response import SettingsServiceGetLoginSettingsResponse +from zitadel_client.models.settings_service_get_password_complexity_settings_request import SettingsServiceGetPasswordComplexitySettingsRequest from zitadel_client.models.settings_service_get_password_complexity_settings_response import SettingsServiceGetPasswordComplexitySettingsResponse +from zitadel_client.models.settings_service_get_password_expiry_settings_request import SettingsServiceGetPasswordExpirySettingsRequest from zitadel_client.models.settings_service_get_password_expiry_settings_response import SettingsServiceGetPasswordExpirySettingsResponse from zitadel_client.models.settings_service_get_security_settings_response import SettingsServiceGetSecuritySettingsResponse from zitadel_client.models.settings_service_identity_provider import SettingsServiceIdentityProvider @@ -223,41 +695,68 @@ from zitadel_client.models.settings_service_passkeys_type import SettingsServicePasskeysType from zitadel_client.models.settings_service_password_complexity_settings import SettingsServicePasswordComplexitySettings from zitadel_client.models.settings_service_password_expiry_settings import SettingsServicePasswordExpirySettings -from zitadel_client.models.settings_service_protobuf_any import SettingsServiceProtobufAny +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType -from zitadel_client.models.settings_service_rpc_status import SettingsServiceRpcStatus from zitadel_client.models.settings_service_second_factor_type import SettingsServiceSecondFactorType from zitadel_client.models.settings_service_security_settings import SettingsServiceSecuritySettings from zitadel_client.models.settings_service_set_security_settings_request import SettingsServiceSetSecuritySettingsRequest from zitadel_client.models.settings_service_set_security_settings_response import SettingsServiceSetSecuritySettingsResponse from zitadel_client.models.settings_service_theme import SettingsServiceTheme from zitadel_client.models.settings_service_theme_mode import SettingsServiceThemeMode +from zitadel_client.models.state_query import StateQuery +from zitadel_client.models.state_query1 import StateQuery1 +from zitadel_client.models.state_query2 import StateQuery2 +from zitadel_client.models.target_filter import TargetFilter +from zitadel_client.models.target_name_filter import TargetNameFilter +from zitadel_client.models.tenant_id import TenantId +from zitadel_client.models.tenant_type import TenantType +from zitadel_client.models.type_query import TypeQuery +from zitadel_client.models.type_query1 import TypeQuery1 +from zitadel_client.models.u2f import U2f +from zitadel_client.models.urls import Urls +from zitadel_client.models.urls1 import Urls1 +from zitadel_client.models.user_agent_query import UserAgentQuery +from zitadel_client.models.user_id import UserId +from zitadel_client.models.user_id_query import UserIdQuery +from zitadel_client.models.user_id_query1 import UserIdQuery1 +from zitadel_client.models.user_name_query import UserNameQuery +from zitadel_client.models.user_name_query1 import UserNameQuery1 from zitadel_client.models.user_service_access_token_type import UserServiceAccessTokenType from zitadel_client.models.user_service_add_human_user_request import UserServiceAddHumanUserRequest from zitadel_client.models.user_service_add_human_user_response import UserServiceAddHumanUserResponse from zitadel_client.models.user_service_add_idp_link_request import UserServiceAddIDPLinkRequest from zitadel_client.models.user_service_add_idp_link_response import UserServiceAddIDPLinkResponse +from zitadel_client.models.user_service_add_otp_email_request import UserServiceAddOTPEmailRequest from zitadel_client.models.user_service_add_otp_email_response import UserServiceAddOTPEmailResponse +from zitadel_client.models.user_service_add_otpsms_request import UserServiceAddOTPSMSRequest from zitadel_client.models.user_service_add_otpsms_response import UserServiceAddOTPSMSResponse from zitadel_client.models.user_service_and_query import UserServiceAndQuery +from zitadel_client.models.user_service_any import UserServiceAny from zitadel_client.models.user_service_auth_factor import UserServiceAuthFactor from zitadel_client.models.user_service_auth_factor_state import UserServiceAuthFactorState from zitadel_client.models.user_service_auth_factor_u2_f import UserServiceAuthFactorU2F +from zitadel_client.models.user_service_auth_factors import UserServiceAuthFactors from zitadel_client.models.user_service_authentication_method_type import UserServiceAuthenticationMethodType +from zitadel_client.models.user_service_connect_error import UserServiceConnectError from zitadel_client.models.user_service_create_invite_code_request import UserServiceCreateInviteCodeRequest from zitadel_client.models.user_service_create_invite_code_response import UserServiceCreateInviteCodeResponse from zitadel_client.models.user_service_create_passkey_registration_link_request import UserServiceCreatePasskeyRegistrationLinkRequest from zitadel_client.models.user_service_create_passkey_registration_link_response import UserServiceCreatePasskeyRegistrationLinkResponse +from zitadel_client.models.user_service_deactivate_user_request import UserServiceDeactivateUserRequest from zitadel_client.models.user_service_deactivate_user_response import UserServiceDeactivateUserResponse +from zitadel_client.models.user_service_delete_user_request import UserServiceDeleteUserRequest from zitadel_client.models.user_service_delete_user_response import UserServiceDeleteUserResponse from zitadel_client.models.user_service_details import UserServiceDetails from zitadel_client.models.user_service_display_name_query import UserServiceDisplayNameQuery +from zitadel_client.models.user_service_domain_query import UserServiceDomainQuery from zitadel_client.models.user_service_email_query import UserServiceEmailQuery from zitadel_client.models.user_service_first_name_query import UserServiceFirstNameQuery from zitadel_client.models.user_service_gender import UserServiceGender +from zitadel_client.models.user_service_get_user_by_id_request import UserServiceGetUserByIDRequest from zitadel_client.models.user_service_get_user_by_id_response import UserServiceGetUserByIDResponse from zitadel_client.models.user_service_hashed_password import UserServiceHashedPassword from zitadel_client.models.user_service_human_email import UserServiceHumanEmail +from zitadel_client.models.user_service_human_mfa_init_skipped_request import UserServiceHumanMFAInitSkippedRequest from zitadel_client.models.user_service_human_mfa_init_skipped_response import UserServiceHumanMFAInitSkippedResponse from zitadel_client.models.user_service_human_phone import UserServiceHumanPhone from zitadel_client.models.user_service_human_profile import UserServiceHumanProfile @@ -272,15 +771,19 @@ from zitadel_client.models.user_service_in_user_id_query import UserServiceInUserIDQuery from zitadel_client.models.user_service_ldap_credentials import UserServiceLDAPCredentials from zitadel_client.models.user_service_last_name_query import UserServiceLastNameQuery +from zitadel_client.models.user_service_list_authentication_factors_request import UserServiceListAuthenticationFactorsRequest from zitadel_client.models.user_service_list_authentication_factors_response import UserServiceListAuthenticationFactorsResponse +from zitadel_client.models.user_service_list_authentication_method_types_request import UserServiceListAuthenticationMethodTypesRequest from zitadel_client.models.user_service_list_authentication_method_types_response import UserServiceListAuthenticationMethodTypesResponse from zitadel_client.models.user_service_list_details import UserServiceListDetails from zitadel_client.models.user_service_list_idp_links_request import UserServiceListIDPLinksRequest from zitadel_client.models.user_service_list_idp_links_response import UserServiceListIDPLinksResponse +from zitadel_client.models.user_service_list_passkeys_request import UserServiceListPasskeysRequest from zitadel_client.models.user_service_list_passkeys_response import UserServiceListPasskeysResponse from zitadel_client.models.user_service_list_query import UserServiceListQuery from zitadel_client.models.user_service_list_users_request import UserServiceListUsersRequest from zitadel_client.models.user_service_list_users_response import UserServiceListUsersResponse +from zitadel_client.models.user_service_lock_user_request import UserServiceLockUserRequest from zitadel_client.models.user_service_lock_user_response import UserServiceLockUserResponse from zitadel_client.models.user_service_login_name_query import UserServiceLoginNameQuery from zitadel_client.models.user_service_machine_user import UserServiceMachineUser @@ -297,29 +800,37 @@ from zitadel_client.models.user_service_password_reset_request import UserServicePasswordResetRequest from zitadel_client.models.user_service_password_reset_response import UserServicePasswordResetResponse from zitadel_client.models.user_service_phone_query import UserServicePhoneQuery -from zitadel_client.models.user_service_protobuf_any import UserServiceProtobufAny +from zitadel_client.models.user_service_reactivate_user_request import UserServiceReactivateUserRequest from zitadel_client.models.user_service_reactivate_user_response import UserServiceReactivateUserResponse from zitadel_client.models.user_service_redirect_urls import UserServiceRedirectURLs from zitadel_client.models.user_service_register_passkey_request import UserServiceRegisterPasskeyRequest from zitadel_client.models.user_service_register_passkey_response import UserServiceRegisterPasskeyResponse +from zitadel_client.models.user_service_register_totp_request import UserServiceRegisterTOTPRequest from zitadel_client.models.user_service_register_totp_response import UserServiceRegisterTOTPResponse from zitadel_client.models.user_service_register_u2_f_request import UserServiceRegisterU2FRequest from zitadel_client.models.user_service_register_u2_f_response import UserServiceRegisterU2FResponse +from zitadel_client.models.user_service_remove_idp_link_request import UserServiceRemoveIDPLinkRequest from zitadel_client.models.user_service_remove_idp_link_response import UserServiceRemoveIDPLinkResponse +from zitadel_client.models.user_service_remove_otp_email_request import UserServiceRemoveOTPEmailRequest from zitadel_client.models.user_service_remove_otp_email_response import UserServiceRemoveOTPEmailResponse +from zitadel_client.models.user_service_remove_otpsms_request import UserServiceRemoveOTPSMSRequest from zitadel_client.models.user_service_remove_otpsms_response import UserServiceRemoveOTPSMSResponse +from zitadel_client.models.user_service_remove_passkey_request import UserServiceRemovePasskeyRequest from zitadel_client.models.user_service_remove_passkey_response import UserServiceRemovePasskeyResponse +from zitadel_client.models.user_service_remove_phone_request import UserServiceRemovePhoneRequest from zitadel_client.models.user_service_remove_phone_response import UserServiceRemovePhoneResponse +from zitadel_client.models.user_service_remove_totp_request import UserServiceRemoveTOTPRequest from zitadel_client.models.user_service_remove_totp_response import UserServiceRemoveTOTPResponse +from zitadel_client.models.user_service_remove_u2_f_request import UserServiceRemoveU2FRequest from zitadel_client.models.user_service_remove_u2_f_response import UserServiceRemoveU2FResponse from zitadel_client.models.user_service_resend_email_code_request import UserServiceResendEmailCodeRequest from zitadel_client.models.user_service_resend_email_code_response import UserServiceResendEmailCodeResponse +from zitadel_client.models.user_service_resend_invite_code_request import UserServiceResendInviteCodeRequest from zitadel_client.models.user_service_resend_invite_code_response import UserServiceResendInviteCodeResponse from zitadel_client.models.user_service_resend_phone_code_request import UserServiceResendPhoneCodeRequest from zitadel_client.models.user_service_resend_phone_code_response import UserServiceResendPhoneCodeResponse from zitadel_client.models.user_service_retrieve_identity_provider_intent_request import UserServiceRetrieveIdentityProviderIntentRequest from zitadel_client.models.user_service_retrieve_identity_provider_intent_response import UserServiceRetrieveIdentityProviderIntentResponse -from zitadel_client.models.user_service_rpc_status import UserServiceRpcStatus from zitadel_client.models.user_service_search_query import UserServiceSearchQuery from zitadel_client.models.user_service_send_email_code_request import UserServiceSendEmailCodeRequest from zitadel_client.models.user_service_send_email_code_response import UserServiceSendEmailCodeResponse @@ -344,6 +855,7 @@ from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from zitadel_client.models.user_service_type import UserServiceType from zitadel_client.models.user_service_type_query import UserServiceTypeQuery +from zitadel_client.models.user_service_unlock_user_request import UserServiceUnlockUserRequest from zitadel_client.models.user_service_unlock_user_response import UserServiceUnlockUserResponse from zitadel_client.models.user_service_update_human_user_request import UserServiceUpdateHumanUserRequest from zitadel_client.models.user_service_update_human_user_response import UserServiceUpdateHumanUserResponse @@ -351,6 +863,7 @@ from zitadel_client.models.user_service_user_field_name import UserServiceUserFieldName from zitadel_client.models.user_service_user_name_query import UserServiceUserNameQuery from zitadel_client.models.user_service_user_state import UserServiceUserState +from zitadel_client.models.user_service_value import UserServiceValue from zitadel_client.models.user_service_verify_email_request import UserServiceVerifyEmailRequest from zitadel_client.models.user_service_verify_email_response import UserServiceVerifyEmailResponse from zitadel_client.models.user_service_verify_invite_code_request import UserServiceVerifyInviteCodeRequest @@ -363,19 +876,4 @@ from zitadel_client.models.user_service_verify_totp_registration_response import UserServiceVerifyTOTPRegistrationResponse from zitadel_client.models.user_service_verify_u2_f_registration_request import UserServiceVerifyU2FRegistrationRequest from zitadel_client.models.user_service_verify_u2_f_registration_response import UserServiceVerifyU2FRegistrationResponse -from zitadel_client.models.web_key_service_beta_activate_web_key_response import WebKeyServiceBetaActivateWebKeyResponse -from zitadel_client.models.web_key_service_beta_create_web_key_response import WebKeyServiceBetaCreateWebKeyResponse -from zitadel_client.models.web_key_service_beta_delete_web_key_response import WebKeyServiceBetaDeleteWebKeyResponse -from zitadel_client.models.web_key_service_beta_ecdsa import WebKeyServiceBetaECDSA -from zitadel_client.models.web_key_service_beta_ecdsa_curve import WebKeyServiceBetaECDSACurve -from zitadel_client.models.web_key_service_beta_list_web_keys_response import WebKeyServiceBetaListWebKeysResponse -from zitadel_client.models.web_key_service_beta_rsa import WebKeyServiceBetaRSA -from zitadel_client.models.web_key_service_beta_rsa_bits import WebKeyServiceBetaRSABits -from zitadel_client.models.web_key_service_beta_rsa_hasher import WebKeyServiceBetaRSAHasher -from zitadel_client.models.web_key_service_beta_state import WebKeyServiceBetaState -from zitadel_client.models.web_key_service_beta_web_key import WebKeyServiceBetaWebKey -from zitadel_client.models.web_key_service_create_web_key_request import WebKeyServiceCreateWebKeyRequest -from zitadel_client.models.web_key_service_protobuf_any import WebKeyServiceProtobufAny -from zitadel_client.models.web_key_service_rpc_status import WebKeyServiceRpcStatus -from zitadel_client.models.zitadelobjectv2_organization import Zitadelobjectv2Organization -from zitadel_client.models.zitadelorgv2_organization import Zitadelorgv2Organization +from zitadel_client.models.verification_code import VerificationCode diff --git a/zitadel_client/models/action_service_beta_condition.py b/zitadel_client/models/action_service_beta_condition.py deleted file mode 100644 index d8fc622f..00000000 --- a/zitadel_client/models/action_service_beta_condition.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Zitadel SDK - - The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_event_execution import ActionServiceBetaEventExecution -from zitadel_client.models.action_service_beta_function_execution import ActionServiceBetaFunctionExecution -from zitadel_client.models.action_service_beta_request_execution import ActionServiceBetaRequestExecution -from zitadel_client.models.action_service_beta_response_execution import ActionServiceBetaResponseExecution -from typing import Optional, Set -from typing_extensions import Self - -class ActionServiceBetaCondition(BaseModel): - """ - ActionServiceBetaCondition - """ # noqa: E501 - request: Optional[ActionServiceBetaRequestExecution] = None - response: Optional[ActionServiceBetaResponseExecution] = None - function: Optional[ActionServiceBetaFunctionExecution] = None - event: Optional[ActionServiceBetaEventExecution] = None - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaCondition from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaCondition from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "request": ActionServiceBetaRequestExecution.from_dict(obj["request"]) if obj.get("request") is not None else None, - "response": ActionServiceBetaResponseExecution.from_dict(obj["response"]) if obj.get("response") is not None else None, - "function": ActionServiceBetaFunctionExecution.from_dict(obj["function"]) if obj.get("function") is not None else None, - "event": ActionServiceBetaEventExecution.from_dict(obj["event"]) if obj.get("event") is not None else None - }) - return _obj - - diff --git a/zitadel_client/models/action_service_beta_event_execution.py b/zitadel_client/models/action_service_beta_event_execution.py deleted file mode 100644 index 5bf99774..00000000 --- a/zitadel_client/models/action_service_beta_event_execution.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Zitadel SDK - - The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class ActionServiceBetaEventExecution(BaseModel): - """ - ActionServiceBetaEventExecution - """ # noqa: E501 - event: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Event name as condition.") - group: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Event group as condition, all events under this group.") - all: Optional[StrictBool] = Field(default=None, description="all events as condition.") - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaEventExecution from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaEventExecution from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "event": obj.get("event"), - "group": obj.get("group"), - "all": obj.get("all") - }) - return _obj - - diff --git a/zitadel_client/models/action_service_beta_target.py b/zitadel_client/models/action_service_beta_target.py deleted file mode 100644 index 9c22e516..00000000 --- a/zitadel_client/models/action_service_beta_target.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Zitadel SDK - - The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_rest_call import ActionServiceBetaRESTCall -from zitadel_client.models.action_service_beta_rest_webhook import ActionServiceBetaRESTWebhook -from typing import Optional, Set -from typing_extensions import Self - -class ActionServiceBetaTarget(BaseModel): - """ - ActionServiceBetaTarget - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the target.") - creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the target creation.", alias="creationDate") - change_date: Optional[datetime] = Field(default=None, description="The timestamp of the last change to the target (e.g. creation, activation, deactivation).", alias="changeDate") - name: Optional[StrictStr] = None - rest_webhook: Optional[ActionServiceBetaRESTWebhook] = Field(default=None, alias="restWebhook") - rest_call: Optional[ActionServiceBetaRESTCall] = Field(default=None, alias="restCall") - rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") - timeout: Optional[StrictStr] = Field(default=None, description="Timeout defines the duration until ZITADEL cancels the execution. If the target doesn't respond before this timeout expires, the the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.") - endpoint: Optional[StrictStr] = None - signing_key: Optional[StrictStr] = Field(default=None, alias="signingKey") - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaTarget from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaTarget from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "creationDate": obj.get("creationDate"), - "changeDate": obj.get("changeDate"), - "name": obj.get("name"), - "restWebhook": ActionServiceBetaRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None, - "restCall": ActionServiceBetaRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, - "restAsync": obj.get("restAsync"), - "timeout": obj.get("timeout"), - "endpoint": obj.get("endpoint"), - "signingKey": obj.get("signingKey") - }) - return _obj - - diff --git a/zitadel_client/models/action_service_create_target_request.py b/zitadel_client/models/action_service_create_target_request.py deleted file mode 100644 index 8264c755..00000000 --- a/zitadel_client/models/action_service_create_target_request.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - Zitadel SDK - - The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.action_service_beta_rest_call import ActionServiceBetaRESTCall -from zitadel_client.models.action_service_beta_rest_webhook import ActionServiceBetaRESTWebhook -from typing import Optional, Set -from typing_extensions import Self - -class ActionServiceCreateTargetRequest(BaseModel): - """ - ActionServiceCreateTargetRequest - """ # noqa: E501 - name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None - rest_webhook: Optional[ActionServiceBetaRESTWebhook] = Field(default=None, alias="restWebhook") - rest_call: Optional[ActionServiceBetaRESTCall] = Field(default=None, alias="restCall") - rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") - timeout: Optional[StrictStr] = Field(default=None, description="Timeout defines the duration until ZITADEL cancels the execution. If the target doesn't respond before this timeout expires, then the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.") - endpoint: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceCreateTargetRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceCreateTargetRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "restWebhook": ActionServiceBetaRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None, - "restCall": ActionServiceBetaRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, - "restAsync": obj.get("restAsync"), - "timeout": obj.get("timeout"), - "endpoint": obj.get("endpoint") - }) - return _obj - - diff --git a/zitadel_client/models/action_service_update_target_request.py b/zitadel_client/models/action_service_update_target_request.py deleted file mode 100644 index 774add03..00000000 --- a/zitadel_client/models/action_service_update_target_request.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Zitadel SDK - - The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.action_service_beta_rest_call import ActionServiceBetaRESTCall -from zitadel_client.models.action_service_beta_rest_webhook import ActionServiceBetaRESTWebhook -from typing import Optional, Set -from typing_extensions import Self - -class ActionServiceUpdateTargetRequest(BaseModel): - """ - ActionServiceUpdateTargetRequest - """ # noqa: E501 - name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None - rest_webhook: Optional[ActionServiceBetaRESTWebhook] = Field(default=None, alias="restWebhook") - rest_call: Optional[ActionServiceBetaRESTCall] = Field(default=None, alias="restCall") - rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") - timeout: Optional[StrictStr] = Field(default=None, description="Timeout defines the duration until ZITADEL cancels the execution. If the target doesn't respond before this timeout expires, then the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.") - endpoint: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None - expiration_signing_key: Optional[StrictStr] = Field(default=None, description="Regenerate the key used for signing and checking the payload sent to the target. Set the graceful period for the existing key. During that time, the previous signing key and the new one will be used to sign the request to allow you a smooth transition onf your API. Note that we currently only allow an immediate rotation (\"0s\") and will support longer expirations in the future.", alias="expirationSigningKey") - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceUpdateTargetRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceUpdateTargetRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "restWebhook": ActionServiceBetaRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None, - "restCall": ActionServiceBetaRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, - "restAsync": obj.get("restAsync"), - "timeout": obj.get("timeout"), - "endpoint": obj.get("endpoint"), - "expirationSigningKey": obj.get("expirationSigningKey") - }) - return _obj - - diff --git a/zitadel_client/models/all.py b/zitadel_client/models/all.py new file mode 100644 index 00000000..ab1c36c6 --- /dev/null +++ b/zitadel_client/models/all.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class All(BaseModel): + """ + All + """ # noqa: E501 + all: StrictBool = Field(description="all events as condition.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of All from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of All from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "all": obj.get("all") + }) + return _obj + + diff --git a/zitadel_client/models/all1.py b/zitadel_client/models/all1.py new file mode 100644 index 00000000..bfa779f5 --- /dev/null +++ b/zitadel_client/models/all1.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class All1(BaseModel): + """ + All1 + """ # noqa: E501 + all: StrictBool = Field(description="All calls to any available services and methods as condition.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of All1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of All1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "all": obj.get("all") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_delete_web_key_response.py b/zitadel_client/models/and_query.py similarity index 75% rename from zitadel_client/models/web_key_service_beta_delete_web_key_response.py rename to zitadel_client/models/and_query.py index b8e96839..1196f7d2 100644 --- a/zitadel_client/models/web_key_service_beta_delete_web_key_response.py +++ b/zitadel_client/models/and_query.py @@ -17,17 +17,16 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceBetaDeleteWebKeyResponse(BaseModel): +class AndQuery(BaseModel): """ - WebKeyServiceBetaDeleteWebKeyResponse + AndQuery """ # 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") + and_query: UserServiceAndQuery = Field(alias="andQuery") model_config = ConfigDict( populate_by_name=True, @@ -47,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaDeleteWebKeyResponse from a JSON string""" + """Create an instance of AndQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -68,11 +67,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of and_query + if self.and_query: + _dict['andQuery'] = self.and_query.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaDeleteWebKeyResponse from a dict""" + """Create an instance of AndQuery from a dict""" if obj is None: return None @@ -80,8 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "deletionDate": obj.get("deletionDate") + "andQuery": UserServiceAndQuery.from_dict(obj["andQuery"]) if obj.get("andQuery") is not None else None }) return _obj +from zitadel_client.models.user_service_and_query import UserServiceAndQuery +# TODO: Rewrite to not use raise_errors +AndQuery.model_rebuild(raise_errors=False) diff --git a/zitadel_client/models/and_query1.py b/zitadel_client/models/and_query1.py new file mode 100644 index 00000000..f415c2dc --- /dev/null +++ b/zitadel_client/models/and_query1.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AndQuery1(BaseModel): + """ + AndQuery1 + """ # noqa: E501 + and_query: BetaUserServiceAndQuery = Field(alias="andQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AndQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of and_query + if self.and_query: + _dict['andQuery'] = self.and_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AndQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "andQuery": BetaUserServiceAndQuery.from_dict(obj["andQuery"]) if obj.get("andQuery") is not None else None + }) + return _obj + +from zitadel_client.models.beta_user_service_and_query import BetaUserServiceAndQuery +# TODO: Rewrite to not use raise_errors +AndQuery1.model_rebuild(raise_errors=False) + diff --git a/zitadel_client/models/apple.py b/zitadel_client/models/apple.py new file mode 100644 index 00000000..13de57bf --- /dev/null +++ b/zitadel_client/models/apple.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.identity_provider_service_apple_config import IdentityProviderServiceAppleConfig +from typing import Optional, Set +from typing_extensions import Self + +class Apple(BaseModel): + """ + Apple + """ # noqa: E501 + apple: IdentityProviderServiceAppleConfig + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Apple from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of apple + if self.apple: + _dict['apple'] = self.apple.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Apple from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apple": IdentityProviderServiceAppleConfig.from_dict(obj["apple"]) if obj.get("apple") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/oidc_service_protobuf_any.py b/zitadel_client/models/auth_url.py similarity index 85% rename from zitadel_client/models/oidc_service_protobuf_any.py rename to zitadel_client/models/auth_url.py index 4f92153a..51931862 100644 --- a/zitadel_client/models/oidc_service_protobuf_any.py +++ b/zitadel_client/models/auth_url.py @@ -18,15 +18,15 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class OIDCServiceProtobufAny(BaseModel): +class AuthUrl(BaseModel): """ - OIDCServiceProtobufAny + AuthUrl """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + auth_url: StrictStr = Field(alias="authUrl") model_config = ConfigDict( populate_by_name=True, @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OIDCServiceProtobufAny from a JSON string""" + """Create an instance of AuthUrl from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OIDCServiceProtobufAny from a dict""" + """Create an instance of AuthUrl from a dict""" if obj is None: return None @@ -79,7 +79,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "authUrl": obj.get("authUrl") }) return _obj diff --git a/zitadel_client/models/azure_ad.py b/zitadel_client/models/azure_ad.py new file mode 100644 index 00000000..b7995580 --- /dev/null +++ b/zitadel_client/models/azure_ad.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.identity_provider_service_azure_ad_config import IdentityProviderServiceAzureADConfig +from typing import Optional, Set +from typing_extensions import Self + +class AzureAd(BaseModel): + """ + AzureAd + """ # noqa: E501 + azure_ad: IdentityProviderServiceAzureADConfig = Field(alias="azureAd") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AzureAd from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of azure_ad + if self.azure_ad: + _dict['azureAd'] = self.azure_ad.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AzureAd from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "azureAd": IdentityProviderServiceAzureADConfig.from_dict(obj["azureAd"]) if obj.get("azureAd") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_any.py b/zitadel_client/models/beta_action_service_any.py new file mode 100644 index 00000000..f7e4e0ee --- /dev/null +++ b/zitadel_client/models/beta_action_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_condition.py b/zitadel_client/models/beta_action_service_condition.py new file mode 100644 index 00000000..92fcd0a4 --- /dev/null +++ b/zitadel_client/models/beta_action_service_condition.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.event import Event +from zitadel_client.models.function import Function +from zitadel_client.models.request import Request +from zitadel_client.models.response import Response +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAACTIONSERVICECONDITION_ONE_OF_SCHEMAS = ["Event", "Function", "Request", "Response"] + +class BetaActionServiceCondition(BaseModel): + """ + BetaActionServiceCondition + """ + # data type: Event + oneof_schema_1_validator: Optional[Event] = None + # data type: Function + oneof_schema_2_validator: Optional[Function] = None + # data type: Request + oneof_schema_3_validator: Optional[Request] = None + # data type: Response + oneof_schema_4_validator: Optional[Response] = None + actual_instance: Optional[Union[Event, Function, Request, Response]] = None + one_of_schemas: Set[str] = { "Event", "Function", "Request", "Response" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaActionServiceCondition.model_construct() + error_messages = [] + match = 0 + # validate data type: Event + if not isinstance(v, Event): + error_messages.append(f"Error! Input type `{type(v)}` is not `Event`") + else: + match += 1 + # validate data type: Function + if not isinstance(v, Function): + error_messages.append(f"Error! Input type `{type(v)}` is not `Function`") + else: + match += 1 + # validate data type: Request + if not isinstance(v, Request): + error_messages.append(f"Error! Input type `{type(v)}` is not `Request`") + else: + match += 1 + # validate data type: Response + if not isinstance(v, Response): + error_messages.append(f"Error! Input type `{type(v)}` is not `Response`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaActionServiceCondition with oneOf schemas: Event, Function, Request, Response. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaActionServiceCondition with oneOf schemas: Event, Function, Request, Response. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Event + try: + instance.actual_instance = Event.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Function + try: + instance.actual_instance = Function.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Request + try: + instance.actual_instance = Request.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Response + try: + instance.actual_instance = Response.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaActionServiceCondition with oneOf schemas: Event, Function, Request, Response. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaActionServiceCondition with oneOf schemas: Event, Function, Request, Response. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Event, Function, Request, Response]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_action_service_connect_error.py b/zitadel_client/models/beta_action_service_connect_error.py new file mode 100644 index 00000000..c9ce67cb --- /dev/null +++ b/zitadel_client/models/beta_action_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_action_service_any import BetaActionServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaActionServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaActionServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_create_target_request.py b/zitadel_client/models/beta_action_service_create_target_request.py new file mode 100644 index 00000000..7af2ad51 --- /dev/null +++ b/zitadel_client/models/beta_action_service_create_target_request.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.rest_async import RestAsync +from zitadel_client.models.rest_call import RestCall +from zitadel_client.models.rest_webhook import RestWebhook +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAACTIONSERVICECREATETARGETREQUEST_ONE_OF_SCHEMAS = ["RestAsync", "RestCall", "RestWebhook"] + +class BetaActionServiceCreateTargetRequest(BaseModel): + """ + BetaActionServiceCreateTargetRequest + """ + # data type: RestAsync + oneof_schema_1_validator: Optional[RestAsync] = None + # data type: RestCall + oneof_schema_2_validator: Optional[RestCall] = None + # data type: RestWebhook + oneof_schema_3_validator: Optional[RestWebhook] = None + actual_instance: Optional[Union[RestAsync, RestCall, RestWebhook]] = None + one_of_schemas: Set[str] = { "RestAsync", "RestCall", "RestWebhook" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaActionServiceCreateTargetRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: RestAsync + if not isinstance(v, RestAsync): + error_messages.append(f"Error! Input type `{type(v)}` is not `RestAsync`") + else: + match += 1 + # validate data type: RestCall + if not isinstance(v, RestCall): + error_messages.append(f"Error! Input type `{type(v)}` is not `RestCall`") + else: + match += 1 + # validate data type: RestWebhook + if not isinstance(v, RestWebhook): + error_messages.append(f"Error! Input type `{type(v)}` is not `RestWebhook`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaActionServiceCreateTargetRequest with oneOf schemas: RestAsync, RestCall, RestWebhook. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaActionServiceCreateTargetRequest with oneOf schemas: RestAsync, RestCall, RestWebhook. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into RestAsync + try: + instance.actual_instance = RestAsync.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RestCall + try: + instance.actual_instance = RestCall.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RestWebhook + try: + instance.actual_instance = RestWebhook.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaActionServiceCreateTargetRequest with oneOf schemas: RestAsync, RestCall, RestWebhook. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaActionServiceCreateTargetRequest with oneOf schemas: RestAsync, RestCall, RestWebhook. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], RestAsync, RestCall, RestWebhook]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_action_service_create_target_response.py b/zitadel_client/models/beta_action_service_create_target_response.py new file mode 100644 index 00000000..11ce654c --- /dev/null +++ b/zitadel_client/models/beta_action_service_create_target_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceCreateTargetResponse(BaseModel): + """ + BetaActionServiceCreateTargetResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the newly created target.") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + signing_key: Optional[StrictStr] = Field(default=None, description="Key used to sign and check payload sent to the target.", alias="signingKey") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceCreateTargetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceCreateTargetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "signingKey": obj.get("signingKey") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_delete_target_request.py b/zitadel_client/models/beta_action_service_delete_target_request.py new file mode 100644 index 00000000..13262cd2 --- /dev/null +++ b/zitadel_client/models/beta_action_service_delete_target_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceDeleteTargetRequest(BaseModel): + """ + BetaActionServiceDeleteTargetRequest + """ # noqa: E501 + id: StrictStr + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceDeleteTargetRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceDeleteTargetRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_delete_target_response.py b/zitadel_client/models/beta_action_service_delete_target_response.py new file mode 100644 index 00000000..df09fb4a --- /dev/null +++ b/zitadel_client/models/beta_action_service_delete_target_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceDeleteTargetResponse(BaseModel): + """ + BetaActionServiceDeleteTargetResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceDeleteTargetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceDeleteTargetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_event_execution.py b/zitadel_client/models/beta_action_service_event_execution.py new file mode 100644 index 00000000..06af9237 --- /dev/null +++ b/zitadel_client/models/beta_action_service_event_execution.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.all import All +from zitadel_client.models.event1 import Event1 +from zitadel_client.models.group import Group +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAACTIONSERVICEEVENTEXECUTION_ONE_OF_SCHEMAS = ["All", "Event1", "Group"] + +class BetaActionServiceEventExecution(BaseModel): + """ + BetaActionServiceEventExecution + """ + # data type: All + oneof_schema_1_validator: Optional[All] = None + # data type: Event1 + oneof_schema_2_validator: Optional[Event1] = None + # data type: Group + oneof_schema_3_validator: Optional[Group] = None + actual_instance: Optional[Union[All, Event1, Group]] = None + one_of_schemas: Set[str] = { "All", "Event1", "Group" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaActionServiceEventExecution.model_construct() + error_messages = [] + match = 0 + # validate data type: All + if not isinstance(v, All): + error_messages.append(f"Error! Input type `{type(v)}` is not `All`") + else: + match += 1 + # validate data type: Event1 + if not isinstance(v, Event1): + error_messages.append(f"Error! Input type `{type(v)}` is not `Event1`") + else: + match += 1 + # validate data type: Group + if not isinstance(v, Group): + error_messages.append(f"Error! Input type `{type(v)}` is not `Group`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaActionServiceEventExecution with oneOf schemas: All, Event1, Group. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaActionServiceEventExecution with oneOf schemas: All, Event1, Group. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into All + try: + instance.actual_instance = All.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Event1 + try: + instance.actual_instance = Event1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Group + try: + instance.actual_instance = Group.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaActionServiceEventExecution with oneOf schemas: All, Event1, Group. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaActionServiceEventExecution with oneOf schemas: All, Event1, Group. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], All, Event1, Group]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_action_service_execution.py b/zitadel_client/models/beta_action_service_execution.py new file mode 100644 index 00000000..ab9fec61 --- /dev/null +++ b/zitadel_client/models/beta_action_service_execution.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_action_service_condition import BetaActionServiceCondition +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceExecution(BaseModel): + """ + BetaActionServiceExecution + """ # noqa: E501 + condition: Optional[BetaActionServiceCondition] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + targets: Optional[List[StrictStr]] = Field(default=None, description="Ordered list of targets called during the execution.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceExecution from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of condition + if self.condition: + _dict['condition'] = self.condition.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceExecution from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "condition": BetaActionServiceCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "targets": obj.get("targets") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_execution_field_name.py b/zitadel_client/models/beta_action_service_execution_field_name.py new file mode 100644 index 00000000..af2d7b0b --- /dev/null +++ b/zitadel_client/models/beta_action_service_execution_field_name.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaActionServiceExecutionFieldName(str, Enum): + """ + BetaActionServiceExecutionFieldName + """ + + """ + allowed enum values + """ + EXECUTION_FIELD_NAME_UNSPECIFIED = 'EXECUTION_FIELD_NAME_UNSPECIFIED' + EXECUTION_FIELD_NAME_ID = 'EXECUTION_FIELD_NAME_ID' + EXECUTION_FIELD_NAME_CREATED_DATE = 'EXECUTION_FIELD_NAME_CREATED_DATE' + EXECUTION_FIELD_NAME_CHANGED_DATE = 'EXECUTION_FIELD_NAME_CHANGED_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaActionServiceExecutionFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_action_service_execution_search_filter.py b/zitadel_client/models/beta_action_service_execution_search_filter.py new file mode 100644 index 00000000..d94b65bc --- /dev/null +++ b/zitadel_client/models/beta_action_service_execution_search_filter.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.execution_type_filter import ExecutionTypeFilter +from zitadel_client.models.in_conditions_filter import InConditionsFilter +from zitadel_client.models.target_filter import TargetFilter +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAACTIONSERVICEEXECUTIONSEARCHFILTER_ONE_OF_SCHEMAS = ["ExecutionTypeFilter", "InConditionsFilter", "TargetFilter"] + +class BetaActionServiceExecutionSearchFilter(BaseModel): + """ + BetaActionServiceExecutionSearchFilter + """ + # data type: ExecutionTypeFilter + oneof_schema_1_validator: Optional[ExecutionTypeFilter] = None + # data type: InConditionsFilter + oneof_schema_2_validator: Optional[InConditionsFilter] = None + # data type: TargetFilter + oneof_schema_3_validator: Optional[TargetFilter] = None + actual_instance: Optional[Union[ExecutionTypeFilter, InConditionsFilter, TargetFilter]] = None + one_of_schemas: Set[str] = { "ExecutionTypeFilter", "InConditionsFilter", "TargetFilter" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaActionServiceExecutionSearchFilter.model_construct() + error_messages = [] + match = 0 + # validate data type: ExecutionTypeFilter + if not isinstance(v, ExecutionTypeFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `ExecutionTypeFilter`") + else: + match += 1 + # validate data type: InConditionsFilter + if not isinstance(v, InConditionsFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `InConditionsFilter`") + else: + match += 1 + # validate data type: TargetFilter + if not isinstance(v, TargetFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `TargetFilter`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaActionServiceExecutionSearchFilter with oneOf schemas: ExecutionTypeFilter, InConditionsFilter, TargetFilter. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaActionServiceExecutionSearchFilter with oneOf schemas: ExecutionTypeFilter, InConditionsFilter, TargetFilter. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ExecutionTypeFilter + try: + instance.actual_instance = ExecutionTypeFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into InConditionsFilter + try: + instance.actual_instance = InConditionsFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TargetFilter + try: + instance.actual_instance = TargetFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaActionServiceExecutionSearchFilter with oneOf schemas: ExecutionTypeFilter, InConditionsFilter, TargetFilter. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaActionServiceExecutionSearchFilter with oneOf schemas: ExecutionTypeFilter, InConditionsFilter, TargetFilter. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ExecutionTypeFilter, InConditionsFilter, TargetFilter]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_action_service_execution_type.py b/zitadel_client/models/beta_action_service_execution_type.py new file mode 100644 index 00000000..f37c02fe --- /dev/null +++ b/zitadel_client/models/beta_action_service_execution_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaActionServiceExecutionType(str, Enum): + """ + BetaActionServiceExecutionType + """ + + """ + allowed enum values + """ + EXECUTION_TYPE_UNSPECIFIED = 'EXECUTION_TYPE_UNSPECIFIED' + EXECUTION_TYPE_REQUEST = 'EXECUTION_TYPE_REQUEST' + EXECUTION_TYPE_RESPONSE = 'EXECUTION_TYPE_RESPONSE' + EXECUTION_TYPE_EVENT = 'EXECUTION_TYPE_EVENT' + EXECUTION_TYPE_FUNCTION = 'EXECUTION_TYPE_FUNCTION' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaActionServiceExecutionType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_beta_activate_web_key_response.py b/zitadel_client/models/beta_action_service_execution_type_filter.py similarity index 79% rename from zitadel_client/models/web_key_service_beta_activate_web_key_response.py rename to zitadel_client/models/beta_action_service_execution_type_filter.py index 5ebc1a51..ed11aea7 100644 --- a/zitadel_client/models/web_key_service_beta_activate_web_key_response.py +++ b/zitadel_client/models/beta_action_service_execution_type_filter.py @@ -17,17 +17,17 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_action_service_execution_type import BetaActionServiceExecutionType from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceBetaActivateWebKeyResponse(BaseModel): +class BetaActionServiceExecutionTypeFilter(BaseModel): """ - WebKeyServiceBetaActivateWebKeyResponse + BetaActionServiceExecutionTypeFilter """ # noqa: E501 - change_date: Optional[datetime] = Field(default=None, description="The timestamp of the activation of the key.", alias="changeDate") + execution_type: Optional[BetaActionServiceExecutionType] = Field(default=None, alias="executionType") model_config = ConfigDict( populate_by_name=True, @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaActivateWebKeyResponse from a JSON string""" + """Create an instance of BetaActionServiceExecutionTypeFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaActivateWebKeyResponse from a dict""" + """Create an instance of BetaActionServiceExecutionTypeFilter from a dict""" if obj is None: return None @@ -80,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "changeDate": obj.get("changeDate") + "executionType": obj.get("executionType") }) return _obj diff --git a/zitadel_client/models/action_service_beta_function_execution.py b/zitadel_client/models/beta_action_service_function_execution.py similarity index 89% rename from zitadel_client/models/action_service_beta_function_execution.py rename to zitadel_client/models/beta_action_service_function_execution.py index 4e10174c..6af0ae3f 100644 --- a/zitadel_client/models/action_service_beta_function_execution.py +++ b/zitadel_client/models/beta_action_service_function_execution.py @@ -18,13 +18,13 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaFunctionExecution(BaseModel): +class BetaActionServiceFunctionExecution(BaseModel): """ - ActionServiceBetaFunctionExecution + Executed on the specified function """ # noqa: E501 name: Optional[StrictStr] = None @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaFunctionExecution from a JSON string""" + """Create an instance of BetaActionServiceFunctionExecution from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaFunctionExecution from a dict""" + """Create an instance of BetaActionServiceFunctionExecution from a dict""" if obj is None: return None diff --git a/zitadel_client/models/beta_action_service_get_target_request.py b/zitadel_client/models/beta_action_service_get_target_request.py new file mode 100644 index 00000000..295457df --- /dev/null +++ b/zitadel_client/models/beta_action_service_get_target_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceGetTargetRequest(BaseModel): + """ + BetaActionServiceGetTargetRequest + """ # noqa: E501 + id: Optional[StrictStr] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceGetTargetRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceGetTargetRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_get_target_response.py b/zitadel_client/models/beta_action_service_get_target_response.py similarity index 83% rename from zitadel_client/models/action_service_beta_get_target_response.py rename to zitadel_client/models/beta_action_service_get_target_response.py index 5c23917a..40e57e70 100644 --- a/zitadel_client/models/action_service_beta_get_target_response.py +++ b/zitadel_client/models/beta_action_service_get_target_response.py @@ -18,16 +18,16 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_target import ActionServiceBetaTarget +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_action_service_target import BetaActionServiceTarget from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaGetTargetResponse(BaseModel): +class BetaActionServiceGetTargetResponse(BaseModel): """ - ActionServiceBetaGetTargetResponse + BetaActionServiceGetTargetResponse """ # noqa: E501 - target: Optional[ActionServiceBetaTarget] = None + target: Optional[BetaActionServiceTarget] = None model_config = ConfigDict( populate_by_name=True, @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaGetTargetResponse from a JSON string""" + """Create an instance of BetaActionServiceGetTargetResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaGetTargetResponse from a dict""" + """Create an instance of BetaActionServiceGetTargetResponse from a dict""" if obj is None: return None @@ -83,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "target": ActionServiceBetaTarget.from_dict(obj["target"]) if obj.get("target") is not None else None + "target": BetaActionServiceTarget.from_dict(obj["target"]) if obj.get("target") is not None else None }) return _obj diff --git a/zitadel_client/models/saml_service_rpc_status.py b/zitadel_client/models/beta_action_service_in_conditions_filter.py similarity index 70% rename from zitadel_client/models/saml_service_rpc_status.py rename to zitadel_client/models/beta_action_service_in_conditions_filter.py index 813edfca..e75f7d55 100644 --- a/zitadel_client/models/saml_service_rpc_status.py +++ b/zitadel_client/models/beta_action_service_in_conditions_filter.py @@ -17,19 +17,17 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.saml_service_protobuf_any import SAMLServiceProtobufAny +from zitadel_client.models.beta_action_service_condition import BetaActionServiceCondition from typing import Optional, Set from typing_extensions import Self -class SAMLServiceRpcStatus(BaseModel): +class BetaActionServiceInConditionsFilter(BaseModel): """ - SAMLServiceRpcStatus + BetaActionServiceInConditionsFilter """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[SAMLServiceProtobufAny]] = None + conditions: Optional[List[BetaActionServiceCondition]] = Field(default=None, description="Defines the conditions to query for.") model_config = ConfigDict( populate_by_name=True, @@ -49,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SAMLServiceRpcStatus from a JSON string""" + """Create an instance of BetaActionServiceInConditionsFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +68,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) + # override the default output from pydantic by calling `to_dict()` of each item in conditions (list) _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + if self.conditions: + for _item_conditions in self.conditions: + if _item_conditions: + _items.append(_item_conditions.to_dict()) + _dict['conditions'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SAMLServiceRpcStatus from a dict""" + """Create an instance of BetaActionServiceInConditionsFilter from a dict""" if obj is None: return None @@ -89,9 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [SAMLServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "conditions": [BetaActionServiceCondition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None }) return _obj diff --git a/zitadel_client/models/action_service_beta_in_target_ids_filter.py b/zitadel_client/models/beta_action_service_in_target_ids_filter.py similarity index 89% rename from zitadel_client/models/action_service_beta_in_target_ids_filter.py rename to zitadel_client/models/beta_action_service_in_target_ids_filter.py index d26f8389..aac6567c 100644 --- a/zitadel_client/models/action_service_beta_in_target_ids_filter.py +++ b/zitadel_client/models/beta_action_service_in_target_ids_filter.py @@ -22,11 +22,11 @@ from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaInTargetIDsFilter(BaseModel): +class BetaActionServiceInTargetIDsFilter(BaseModel): """ - ActionServiceBetaInTargetIDsFilter + BetaActionServiceInTargetIDsFilter """ # noqa: E501 - target_ids: Optional[List[StrictStr]] = Field(default=None, description="the ids of the targets to include", alias="targetIds") + target_ids: Optional[List[StrictStr]] = Field(default=None, description="Defines the ids to query for.", alias="targetIds") model_config = ConfigDict( populate_by_name=True, @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaInTargetIDsFilter from a JSON string""" + """Create an instance of BetaActionServiceInTargetIDsFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaInTargetIDsFilter from a dict""" + """Create an instance of BetaActionServiceInTargetIDsFilter from a dict""" if obj is None: return None diff --git a/zitadel_client/models/action_service_beta_list_execution_functions_response.py b/zitadel_client/models/beta_action_service_list_execution_functions_response.py similarity index 85% rename from zitadel_client/models/action_service_beta_list_execution_functions_response.py rename to zitadel_client/models/beta_action_service_list_execution_functions_response.py index eff2f1d5..0aade0a3 100644 --- a/zitadel_client/models/action_service_beta_list_execution_functions_response.py +++ b/zitadel_client/models/beta_action_service_list_execution_functions_response.py @@ -17,16 +17,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaListExecutionFunctionsResponse(BaseModel): +class BetaActionServiceListExecutionFunctionsResponse(BaseModel): """ - ActionServiceBetaListExecutionFunctionsResponse + BetaActionServiceListExecutionFunctionsResponse """ # noqa: E501 - functions: Optional[List[StrictStr]] = None + functions: Optional[List[StrictStr]] = Field(default=None, description="All available methods") model_config = ConfigDict( populate_by_name=True, @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionFunctionsResponse from a JSON string""" + """Create an instance of BetaActionServiceListExecutionFunctionsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionFunctionsResponse from a dict""" + """Create an instance of BetaActionServiceListExecutionFunctionsResponse from a dict""" if obj is None: return None diff --git a/zitadel_client/models/action_service_beta_list_execution_methods_response.py b/zitadel_client/models/beta_action_service_list_execution_methods_response.py similarity index 85% rename from zitadel_client/models/action_service_beta_list_execution_methods_response.py rename to zitadel_client/models/beta_action_service_list_execution_methods_response.py index 87aa02d8..bcd60a33 100644 --- a/zitadel_client/models/action_service_beta_list_execution_methods_response.py +++ b/zitadel_client/models/beta_action_service_list_execution_methods_response.py @@ -17,16 +17,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaListExecutionMethodsResponse(BaseModel): +class BetaActionServiceListExecutionMethodsResponse(BaseModel): """ - ActionServiceBetaListExecutionMethodsResponse + BetaActionServiceListExecutionMethodsResponse """ # noqa: E501 - methods: Optional[List[StrictStr]] = None + methods: Optional[List[StrictStr]] = Field(default=None, description="All available methods") model_config = ConfigDict( populate_by_name=True, @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionMethodsResponse from a JSON string""" + """Create an instance of BetaActionServiceListExecutionMethodsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionMethodsResponse from a dict""" + """Create an instance of BetaActionServiceListExecutionMethodsResponse from a dict""" if obj is None: return None diff --git a/zitadel_client/models/action_service_beta_list_execution_services_response.py b/zitadel_client/models/beta_action_service_list_execution_services_response.py similarity index 85% rename from zitadel_client/models/action_service_beta_list_execution_services_response.py rename to zitadel_client/models/beta_action_service_list_execution_services_response.py index 10f01bb2..e259400e 100644 --- a/zitadel_client/models/action_service_beta_list_execution_services_response.py +++ b/zitadel_client/models/beta_action_service_list_execution_services_response.py @@ -17,16 +17,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaListExecutionServicesResponse(BaseModel): +class BetaActionServiceListExecutionServicesResponse(BaseModel): """ - ActionServiceBetaListExecutionServicesResponse + BetaActionServiceListExecutionServicesResponse """ # noqa: E501 - services: Optional[List[StrictStr]] = None + services: Optional[List[StrictStr]] = Field(default=None, description="All available methods") model_config = ConfigDict( populate_by_name=True, @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionServicesResponse from a JSON string""" + """Create an instance of BetaActionServiceListExecutionServicesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionServicesResponse from a dict""" + """Create an instance of BetaActionServiceListExecutionServicesResponse from a dict""" if obj is None: return None diff --git a/zitadel_client/models/beta_action_service_list_executions_request.py b/zitadel_client/models/beta_action_service_list_executions_request.py new file mode 100644 index 00000000..91db9cb7 --- /dev/null +++ b/zitadel_client/models/beta_action_service_list_executions_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_action_service_execution_field_name import BetaActionServiceExecutionFieldName +from zitadel_client.models.beta_action_service_execution_search_filter import BetaActionServiceExecutionSearchFilter +from zitadel_client.models.beta_action_service_pagination_request import BetaActionServicePaginationRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceListExecutionsRequest(BaseModel): + """ + BetaActionServiceListExecutionsRequest + """ # noqa: E501 + pagination: Optional[BetaActionServicePaginationRequest] = None + sorting_column: Optional[BetaActionServiceExecutionFieldName] = Field(default=None, alias="sortingColumn") + filters: Optional[List[BetaActionServiceExecutionSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceListExecutionsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceListExecutionsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaActionServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filters": [BetaActionServiceExecutionSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_list_executions_response.py b/zitadel_client/models/beta_action_service_list_executions_response.py similarity index 81% rename from zitadel_client/models/action_service_beta_list_executions_response.py rename to zitadel_client/models/beta_action_service_list_executions_response.py index e401be66..e1caee10 100644 --- a/zitadel_client/models/action_service_beta_list_executions_response.py +++ b/zitadel_client/models/beta_action_service_list_executions_response.py @@ -19,17 +19,17 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_execution import ActionServiceBetaExecution -from zitadel_client.models.action_service_beta_pagination_response import ActionServiceBetaPaginationResponse +from zitadel_client.models.beta_action_service_execution import BetaActionServiceExecution +from zitadel_client.models.beta_action_service_pagination_response import BetaActionServicePaginationResponse from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaListExecutionsResponse(BaseModel): +class BetaActionServiceListExecutionsResponse(BaseModel): """ - ActionServiceBetaListExecutionsResponse + BetaActionServiceListExecutionsResponse """ # noqa: E501 - pagination: Optional[ActionServiceBetaPaginationResponse] = None - result: Optional[List[ActionServiceBetaExecution]] = None + pagination: Optional[BetaActionServicePaginationResponse] = None + result: Optional[List[BetaActionServiceExecution]] = None model_config = ConfigDict( populate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionsResponse from a JSON string""" + """Create an instance of BetaActionServiceListExecutionsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -84,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionsResponse from a dict""" + """Create an instance of BetaActionServiceListExecutionsResponse from a dict""" if obj is None: return None @@ -92,8 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "pagination": ActionServiceBetaPaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, - "result": [ActionServiceBetaExecution.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + "pagination": BetaActionServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "result": [BetaActionServiceExecution.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None }) return _obj diff --git a/zitadel_client/models/action_service_list_targets_request.py b/zitadel_client/models/beta_action_service_list_targets_request.py similarity index 72% rename from zitadel_client/models/action_service_list_targets_request.py rename to zitadel_client/models/beta_action_service_list_targets_request.py index 8edc97d0..3e5f0198 100644 --- a/zitadel_client/models/action_service_list_targets_request.py +++ b/zitadel_client/models/beta_action_service_list_targets_request.py @@ -19,19 +19,19 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_pagination_request import ActionServiceBetaPaginationRequest -from zitadel_client.models.action_service_beta_target_field_name import ActionServiceBetaTargetFieldName -from zitadel_client.models.action_service_beta_target_search_filter import ActionServiceBetaTargetSearchFilter +from zitadel_client.models.beta_action_service_pagination_request import BetaActionServicePaginationRequest +from zitadel_client.models.beta_action_service_target_field_name import BetaActionServiceTargetFieldName +from zitadel_client.models.beta_action_service_target_search_filter import BetaActionServiceTargetSearchFilter from typing import Optional, Set from typing_extensions import Self -class ActionServiceListTargetsRequest(BaseModel): +class BetaActionServiceListTargetsRequest(BaseModel): """ - ActionServiceListTargetsRequest + BetaActionServiceListTargetsRequest """ # noqa: E501 - pagination: Optional[ActionServiceBetaPaginationRequest] = None - sorting_column: Optional[ActionServiceBetaTargetFieldName] = Field(default=ActionServiceBetaTargetFieldName.TARGET_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") - filters: Optional[List[ActionServiceBetaTargetSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + pagination: Optional[BetaActionServicePaginationRequest] = None + sorting_column: Optional[BetaActionServiceTargetFieldName] = Field(default=None, alias="sortingColumn") + filters: Optional[List[BetaActionServiceTargetSearchFilter]] = Field(default=None, description="Define the criteria to query for.") model_config = ConfigDict( populate_by_name=True, @@ -51,7 +51,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceListTargetsRequest from a JSON string""" + """Create an instance of BetaActionServiceListTargetsRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -86,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceListTargetsRequest from a dict""" + """Create an instance of BetaActionServiceListTargetsRequest from a dict""" if obj is None: return None @@ -94,9 +94,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "pagination": ActionServiceBetaPaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, - "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else ActionServiceBetaTargetFieldName.TARGET_FIELD_NAME_UNSPECIFIED, - "filters": [ActionServiceBetaTargetSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + "pagination": BetaActionServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filters": [BetaActionServiceTargetSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None }) return _obj diff --git a/zitadel_client/models/action_service_beta_list_targets_response.py b/zitadel_client/models/beta_action_service_list_targets_response.py similarity index 81% rename from zitadel_client/models/action_service_beta_list_targets_response.py rename to zitadel_client/models/beta_action_service_list_targets_response.py index ea3a6666..7a0378d1 100644 --- a/zitadel_client/models/action_service_beta_list_targets_response.py +++ b/zitadel_client/models/beta_action_service_list_targets_response.py @@ -19,17 +19,17 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_pagination_response import ActionServiceBetaPaginationResponse -from zitadel_client.models.action_service_beta_target import ActionServiceBetaTarget +from zitadel_client.models.beta_action_service_pagination_response import BetaActionServicePaginationResponse +from zitadel_client.models.beta_action_service_target import BetaActionServiceTarget from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaListTargetsResponse(BaseModel): +class BetaActionServiceListTargetsResponse(BaseModel): """ - ActionServiceBetaListTargetsResponse + BetaActionServiceListTargetsResponse """ # noqa: E501 - pagination: Optional[ActionServiceBetaPaginationResponse] = None - result: Optional[List[ActionServiceBetaTarget]] = None + pagination: Optional[BetaActionServicePaginationResponse] = None + result: Optional[List[BetaActionServiceTarget]] = None model_config = ConfigDict( populate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaListTargetsResponse from a JSON string""" + """Create an instance of BetaActionServiceListTargetsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -84,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaListTargetsResponse from a dict""" + """Create an instance of BetaActionServiceListTargetsResponse from a dict""" if obj is None: return None @@ -92,8 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "pagination": ActionServiceBetaPaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, - "result": [ActionServiceBetaTarget.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + "pagination": BetaActionServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "result": [BetaActionServiceTarget.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None }) return _obj diff --git a/zitadel_client/models/action_service_beta_pagination_request.py b/zitadel_client/models/beta_action_service_pagination_request.py similarity index 74% rename from zitadel_client/models/action_service_beta_pagination_request.py rename to zitadel_client/models/beta_action_service_pagination_request.py index 203eda76..db95c3f2 100644 --- a/zitadel_client/models/action_service_beta_pagination_request.py +++ b/zitadel_client/models/beta_action_service_pagination_request.py @@ -17,18 +17,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaPaginationRequest(BaseModel): +class BetaActionServicePaginationRequest(BaseModel): """ - ActionServiceBetaPaginationRequest + BetaActionServicePaginationRequest """ # noqa: E501 - offset: Optional[StrictStr] = Field(default=None, description="Starting point for retrieval, in combination of offset used to query a set list of objects.") - limit: Optional[StrictInt] = Field(default=None, description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") - asc: Optional[StrictBool] = Field(default=None, description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.") + offset: Optional[Any] = Field(default=None, description="Starting point for retrieval, in combination of offset used to query a set list of objects.") + limit: Optional[StrictInt] = Field(default=None, description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") + asc: Optional[StrictBool] = Field(default=None, description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.") model_config = ConfigDict( populate_by_name=True, @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaPaginationRequest from a JSON string""" + """Create an instance of BetaActionServicePaginationRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -69,11 +69,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaPaginationRequest from a dict""" + """Create an instance of BetaActionServicePaginationRequest from a dict""" if obj is None: return None diff --git a/zitadel_client/models/action_service_beta_target_name_filter.py b/zitadel_client/models/beta_action_service_pagination_response.py similarity index 64% rename from zitadel_client/models/action_service_beta_target_name_filter.py rename to zitadel_client/models/beta_action_service_pagination_response.py index 20ed7475..bc6dccc7 100644 --- a/zitadel_client/models/action_service_beta_target_name_filter.py +++ b/zitadel_client/models/beta_action_service_pagination_response.py @@ -18,18 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.action_service_beta_text_filter_method import ActionServiceBetaTextFilterMethod +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaTargetNameFilter(BaseModel): +class BetaActionServicePaginationResponse(BaseModel): """ - ActionServiceBetaTargetNameFilter + BetaActionServicePaginationResponse """ # 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 + total_result: Optional[Any] = Field(default=None, description="Absolute number of objects matching the query, regardless of applied limit.", alias="totalResult") + applied_limit: Optional[Any] = Field(default=None, description="Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned.", alias="appliedLimit") model_config = ConfigDict( populate_by_name=True, @@ -49,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaTargetNameFilter from a JSON string""" + """Create an instance of BetaActionServicePaginationResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,11 +68,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if applied_limit (nullable) is None + # and model_fields_set contains the field + if self.applied_limit is None and "applied_limit" in self.model_fields_set: + _dict['appliedLimit'] = None + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaTargetNameFilter from a dict""" + """Create an instance of BetaActionServicePaginationResponse from a dict""" if obj is None: return None @@ -82,8 +90,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "targetName": obj.get("targetName"), - "method": obj.get("method") if obj.get("method") is not None else ActionServiceBetaTextFilterMethod.TEXT_FILTER_METHOD_EQUALS + "totalResult": obj.get("totalResult"), + "appliedLimit": obj.get("appliedLimit") }) return _obj diff --git a/zitadel_client/models/beta_action_service_request_execution.py b/zitadel_client/models/beta_action_service_request_execution.py new file mode 100644 index 00000000..dd341755 --- /dev/null +++ b/zitadel_client/models/beta_action_service_request_execution.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.all1 import All1 +from zitadel_client.models.method import Method +from zitadel_client.models.service import Service +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAACTIONSERVICEREQUESTEXECUTION_ONE_OF_SCHEMAS = ["All1", "Method", "Service"] + +class BetaActionServiceRequestExecution(BaseModel): + """ + BetaActionServiceRequestExecution + """ + # data type: All1 + oneof_schema_1_validator: Optional[All1] = None + # data type: Method + oneof_schema_2_validator: Optional[Method] = None + # data type: Service + oneof_schema_3_validator: Optional[Service] = None + actual_instance: Optional[Union[All1, Method, Service]] = None + one_of_schemas: Set[str] = { "All1", "Method", "Service" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaActionServiceRequestExecution.model_construct() + error_messages = [] + match = 0 + # validate data type: All1 + if not isinstance(v, All1): + error_messages.append(f"Error! Input type `{type(v)}` is not `All1`") + else: + match += 1 + # validate data type: Method + if not isinstance(v, Method): + error_messages.append(f"Error! Input type `{type(v)}` is not `Method`") + else: + match += 1 + # validate data type: Service + if not isinstance(v, Service): + error_messages.append(f"Error! Input type `{type(v)}` is not `Service`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaActionServiceRequestExecution with oneOf schemas: All1, Method, Service. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaActionServiceRequestExecution with oneOf schemas: All1, Method, Service. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into All1 + try: + instance.actual_instance = All1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Method + try: + instance.actual_instance = Method.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Service + try: + instance.actual_instance = Service.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaActionServiceRequestExecution with oneOf schemas: All1, Method, Service. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaActionServiceRequestExecution with oneOf schemas: All1, Method, Service. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], All1, Method, Service]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_action_service_response_execution.py b/zitadel_client/models/beta_action_service_response_execution.py new file mode 100644 index 00000000..3ebe04e4 --- /dev/null +++ b/zitadel_client/models/beta_action_service_response_execution.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.all1 import All1 +from zitadel_client.models.method import Method +from zitadel_client.models.service import Service +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAACTIONSERVICERESPONSEEXECUTION_ONE_OF_SCHEMAS = ["All1", "Method", "Service"] + +class BetaActionServiceResponseExecution(BaseModel): + """ + BetaActionServiceResponseExecution + """ + # data type: All1 + oneof_schema_1_validator: Optional[All1] = None + # data type: Method + oneof_schema_2_validator: Optional[Method] = None + # data type: Service + oneof_schema_3_validator: Optional[Service] = None + actual_instance: Optional[Union[All1, Method, Service]] = None + one_of_schemas: Set[str] = { "All1", "Method", "Service" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaActionServiceResponseExecution.model_construct() + error_messages = [] + match = 0 + # validate data type: All1 + if not isinstance(v, All1): + error_messages.append(f"Error! Input type `{type(v)}` is not `All1`") + else: + match += 1 + # validate data type: Method + if not isinstance(v, Method): + error_messages.append(f"Error! Input type `{type(v)}` is not `Method`") + else: + match += 1 + # validate data type: Service + if not isinstance(v, Service): + error_messages.append(f"Error! Input type `{type(v)}` is not `Service`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaActionServiceResponseExecution with oneOf schemas: All1, Method, Service. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaActionServiceResponseExecution with oneOf schemas: All1, Method, Service. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into All1 + try: + instance.actual_instance = All1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Method + try: + instance.actual_instance = Method.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Service + try: + instance.actual_instance = Service.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaActionServiceResponseExecution with oneOf schemas: All1, Method, Service. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaActionServiceResponseExecution with oneOf schemas: All1, Method, Service. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], All1, Method, Service]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/action_service_beta_rest_call.py b/zitadel_client/models/beta_action_service_rest_call.py similarity index 90% rename from zitadel_client/models/action_service_beta_rest_call.py rename to zitadel_client/models/beta_action_service_rest_call.py index d1aa3e9a..e16faeb5 100644 --- a/zitadel_client/models/action_service_beta_rest_call.py +++ b/zitadel_client/models/beta_action_service_rest_call.py @@ -18,13 +18,13 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaRESTCall(BaseModel): +class BetaActionServiceRESTCall(BaseModel): """ - ActionServiceBetaRESTCall + BetaActionServiceRESTCall """ # 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") @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaRESTCall from a JSON string""" + """Create an instance of BetaActionServiceRESTCall from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaRESTCall from a dict""" + """Create an instance of BetaActionServiceRESTCall from a dict""" if obj is None: return None diff --git a/zitadel_client/models/action_service_beta_rest_webhook.py b/zitadel_client/models/beta_action_service_rest_webhook.py similarity index 90% rename from zitadel_client/models/action_service_beta_rest_webhook.py rename to zitadel_client/models/beta_action_service_rest_webhook.py index fd90bf0e..3f46fda1 100644 --- a/zitadel_client/models/action_service_beta_rest_webhook.py +++ b/zitadel_client/models/beta_action_service_rest_webhook.py @@ -18,13 +18,13 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaRESTWebhook(BaseModel): +class BetaActionServiceRESTWebhook(BaseModel): """ - ActionServiceBetaRESTWebhook + BetaActionServiceRESTWebhook """ # 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") @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaRESTWebhook from a JSON string""" + """Create an instance of BetaActionServiceRESTWebhook from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaRESTWebhook from a dict""" + """Create an instance of BetaActionServiceRESTWebhook from a dict""" if obj is None: return None diff --git a/zitadel_client/models/action_service_set_execution_request.py b/zitadel_client/models/beta_action_service_set_execution_request.py similarity index 84% rename from zitadel_client/models/action_service_set_execution_request.py rename to zitadel_client/models/beta_action_service_set_execution_request.py index 58b67bcf..34ba8042 100644 --- a/zitadel_client/models/action_service_set_execution_request.py +++ b/zitadel_client/models/beta_action_service_set_execution_request.py @@ -19,15 +19,15 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_condition import ActionServiceBetaCondition +from zitadel_client.models.beta_action_service_condition import BetaActionServiceCondition from typing import Optional, Set from typing_extensions import Self -class ActionServiceSetExecutionRequest(BaseModel): +class BetaActionServiceSetExecutionRequest(BaseModel): """ - ActionServiceSetExecutionRequest + BetaActionServiceSetExecutionRequest """ # noqa: E501 - condition: Optional[ActionServiceBetaCondition] = None + condition: Optional[BetaActionServiceCondition] = None targets: Optional[List[StrictStr]] = Field(default=None, description="Ordered list of targets called during the execution.") model_config = ConfigDict( @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceSetExecutionRequest from a JSON string""" + """Create an instance of BetaActionServiceSetExecutionRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -76,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceSetExecutionRequest from a dict""" + """Create an instance of BetaActionServiceSetExecutionRequest from a dict""" if obj is None: return None @@ -84,7 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "condition": ActionServiceBetaCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, + "condition": BetaActionServiceCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, "targets": obj.get("targets") }) return _obj diff --git a/zitadel_client/models/beta_action_service_set_execution_response.py b/zitadel_client/models/beta_action_service_set_execution_response.py new file mode 100644 index 00000000..357da9e6 --- /dev/null +++ b/zitadel_client/models/beta_action_service_set_execution_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceSetExecutionResponse(BaseModel): + """ + BetaActionServiceSetExecutionResponse + """ # noqa: E501 + set_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="setDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceSetExecutionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceSetExecutionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "setDate": obj.get("setDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_target.py b/zitadel_client/models/beta_action_service_target.py new file mode 100644 index 00000000..6f64c3a5 --- /dev/null +++ b/zitadel_client/models/beta_action_service_target.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.rest_async import RestAsync +from zitadel_client.models.rest_call import RestCall +from zitadel_client.models.rest_webhook import RestWebhook +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAACTIONSERVICETARGET_ONE_OF_SCHEMAS = ["RestAsync", "RestCall", "RestWebhook"] + +class BetaActionServiceTarget(BaseModel): + """ + BetaActionServiceTarget + """ + # data type: RestAsync + oneof_schema_1_validator: Optional[RestAsync] = None + # data type: RestCall + oneof_schema_2_validator: Optional[RestCall] = None + # data type: RestWebhook + oneof_schema_3_validator: Optional[RestWebhook] = None + actual_instance: Optional[Union[RestAsync, RestCall, RestWebhook]] = None + one_of_schemas: Set[str] = { "RestAsync", "RestCall", "RestWebhook" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaActionServiceTarget.model_construct() + error_messages = [] + match = 0 + # validate data type: RestAsync + if not isinstance(v, RestAsync): + error_messages.append(f"Error! Input type `{type(v)}` is not `RestAsync`") + else: + match += 1 + # validate data type: RestCall + if not isinstance(v, RestCall): + error_messages.append(f"Error! Input type `{type(v)}` is not `RestCall`") + else: + match += 1 + # validate data type: RestWebhook + if not isinstance(v, RestWebhook): + error_messages.append(f"Error! Input type `{type(v)}` is not `RestWebhook`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaActionServiceTarget with oneOf schemas: RestAsync, RestCall, RestWebhook. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaActionServiceTarget with oneOf schemas: RestAsync, RestCall, RestWebhook. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into RestAsync + try: + instance.actual_instance = RestAsync.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RestCall + try: + instance.actual_instance = RestCall.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RestWebhook + try: + instance.actual_instance = RestWebhook.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaActionServiceTarget with oneOf schemas: RestAsync, RestCall, RestWebhook. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaActionServiceTarget with oneOf schemas: RestAsync, RestCall, RestWebhook. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], RestAsync, RestCall, RestWebhook]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/action_service_beta_target_field_name.py b/zitadel_client/models/beta_action_service_target_field_name.py similarity index 89% rename from zitadel_client/models/action_service_beta_target_field_name.py rename to zitadel_client/models/beta_action_service_target_field_name.py index 3027395e..a432350d 100644 --- a/zitadel_client/models/action_service_beta_target_field_name.py +++ b/zitadel_client/models/beta_action_service_target_field_name.py @@ -18,9 +18,9 @@ from typing_extensions import Self -class ActionServiceBetaTargetFieldName(str, Enum): +class BetaActionServiceTargetFieldName(str, Enum): """ - ActionServiceBetaTargetFieldName + BetaActionServiceTargetFieldName """ """ @@ -38,7 +38,7 @@ class ActionServiceBetaTargetFieldName(str, Enum): @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of ActionServiceBetaTargetFieldName from a JSON string""" + """Create an instance of BetaActionServiceTargetFieldName from a JSON string""" return cls(json.loads(json_str)) diff --git a/zitadel_client/models/beta_action_service_target_filter.py b/zitadel_client/models/beta_action_service_target_filter.py new file mode 100644 index 00000000..c203c81c --- /dev/null +++ b/zitadel_client/models/beta_action_service_target_filter.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceTargetFilter(BaseModel): + """ + BetaActionServiceTargetFilter + """ # noqa: E501 + target_id: Optional[StrictStr] = Field(default=None, description="Defines the id to query for.", alias="targetId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceTargetFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceTargetFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetId": obj.get("targetId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_target_name_filter.py b/zitadel_client/models/beta_action_service_target_name_filter.py new file mode 100644 index 00000000..7a7b04eb --- /dev/null +++ b/zitadel_client/models/beta_action_service_target_name_filter.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_action_service_text_filter_method import BetaActionServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceTargetNameFilter(BaseModel): + """ + BetaActionServiceTargetNameFilter + """ # noqa: E501 + target_name: Optional[StrictStr] = Field(default=None, description="Defines the name of the target to query for.", alias="targetName") + method: Optional[BetaActionServiceTextFilterMethod] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceTargetNameFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceTargetNameFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetName": obj.get("targetName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_target_search_filter.py b/zitadel_client/models/beta_action_service_target_search_filter.py new file mode 100644 index 00000000..cf73635e --- /dev/null +++ b/zitadel_client/models/beta_action_service_target_search_filter.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.in_target_ids_filter import InTargetIdsFilter +from zitadel_client.models.target_name_filter import TargetNameFilter +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAACTIONSERVICETARGETSEARCHFILTER_ONE_OF_SCHEMAS = ["InTargetIdsFilter", "TargetNameFilter"] + +class BetaActionServiceTargetSearchFilter(BaseModel): + """ + BetaActionServiceTargetSearchFilter + """ + # data type: InTargetIdsFilter + oneof_schema_1_validator: Optional[InTargetIdsFilter] = None + # data type: TargetNameFilter + oneof_schema_2_validator: Optional[TargetNameFilter] = None + actual_instance: Optional[Union[InTargetIdsFilter, TargetNameFilter]] = None + one_of_schemas: Set[str] = { "InTargetIdsFilter", "TargetNameFilter" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaActionServiceTargetSearchFilter.model_construct() + error_messages = [] + match = 0 + # validate data type: InTargetIdsFilter + if not isinstance(v, InTargetIdsFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `InTargetIdsFilter`") + else: + match += 1 + # validate data type: TargetNameFilter + if not isinstance(v, TargetNameFilter): + error_messages.append(f"Error! Input type `{type(v)}` is not `TargetNameFilter`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaActionServiceTargetSearchFilter with oneOf schemas: InTargetIdsFilter, TargetNameFilter. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaActionServiceTargetSearchFilter with oneOf schemas: InTargetIdsFilter, TargetNameFilter. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into InTargetIdsFilter + try: + instance.actual_instance = InTargetIdsFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TargetNameFilter + try: + instance.actual_instance = TargetNameFilter.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaActionServiceTargetSearchFilter with oneOf schemas: InTargetIdsFilter, TargetNameFilter. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaActionServiceTargetSearchFilter with oneOf schemas: InTargetIdsFilter, TargetNameFilter. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], InTargetIdsFilter, TargetNameFilter]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/action_service_beta_text_filter_method.py b/zitadel_client/models/beta_action_service_text_filter_method.py similarity index 89% rename from zitadel_client/models/action_service_beta_text_filter_method.py rename to zitadel_client/models/beta_action_service_text_filter_method.py index 4663edd3..c450a2e4 100644 --- a/zitadel_client/models/action_service_beta_text_filter_method.py +++ b/zitadel_client/models/beta_action_service_text_filter_method.py @@ -18,9 +18,9 @@ from typing_extensions import Self -class ActionServiceBetaTextFilterMethod(str, Enum): +class BetaActionServiceTextFilterMethod(str, Enum): """ - ActionServiceBetaTextFilterMethod + BetaActionServiceTextFilterMethod """ """ @@ -37,7 +37,7 @@ class ActionServiceBetaTextFilterMethod(str, Enum): @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of ActionServiceBetaTextFilterMethod from a JSON string""" + """Create an instance of BetaActionServiceTextFilterMethod from a JSON string""" return cls(json.loads(json_str)) diff --git a/zitadel_client/models/beta_action_service_update_target_request.py b/zitadel_client/models/beta_action_service_update_target_request.py new file mode 100644 index 00000000..8b4f380f --- /dev/null +++ b/zitadel_client/models/beta_action_service_update_target_request.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.rest_async import RestAsync +from zitadel_client.models.rest_call import RestCall +from zitadel_client.models.rest_webhook import RestWebhook +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAACTIONSERVICEUPDATETARGETREQUEST_ONE_OF_SCHEMAS = ["RestAsync", "RestCall", "RestWebhook"] + +class BetaActionServiceUpdateTargetRequest(BaseModel): + """ + BetaActionServiceUpdateTargetRequest + """ + # data type: RestAsync + oneof_schema_1_validator: Optional[RestAsync] = None + # data type: RestCall + oneof_schema_2_validator: Optional[RestCall] = None + # data type: RestWebhook + oneof_schema_3_validator: Optional[RestWebhook] = None + actual_instance: Optional[Union[RestAsync, RestCall, RestWebhook]] = None + one_of_schemas: Set[str] = { "RestAsync", "RestCall", "RestWebhook" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaActionServiceUpdateTargetRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: RestAsync + if not isinstance(v, RestAsync): + error_messages.append(f"Error! Input type `{type(v)}` is not `RestAsync`") + else: + match += 1 + # validate data type: RestCall + if not isinstance(v, RestCall): + error_messages.append(f"Error! Input type `{type(v)}` is not `RestCall`") + else: + match += 1 + # validate data type: RestWebhook + if not isinstance(v, RestWebhook): + error_messages.append(f"Error! Input type `{type(v)}` is not `RestWebhook`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaActionServiceUpdateTargetRequest with oneOf schemas: RestAsync, RestCall, RestWebhook. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaActionServiceUpdateTargetRequest with oneOf schemas: RestAsync, RestCall, RestWebhook. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into RestAsync + try: + instance.actual_instance = RestAsync.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RestCall + try: + instance.actual_instance = RestCall.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RestWebhook + try: + instance.actual_instance = RestWebhook.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaActionServiceUpdateTargetRequest with oneOf schemas: RestAsync, RestCall, RestWebhook. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaActionServiceUpdateTargetRequest with oneOf schemas: RestAsync, RestCall, RestWebhook. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], RestAsync, RestCall, RestWebhook]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_action_service_update_target_response.py b/zitadel_client/models/beta_action_service_update_target_response.py new file mode 100644 index 00000000..1aa16925 --- /dev/null +++ b/zitadel_client/models/beta_action_service_update_target_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceUpdateTargetResponse(BaseModel): + """ + BetaActionServiceUpdateTargetResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + signing_key: Optional[StrictStr] = Field(default=None, description="Key used to sign and check payload sent to the target.", alias="signingKey") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceUpdateTargetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if signing_key (nullable) is None + # and model_fields_set contains the field + if self.signing_key is None and "signing_key" in self.model_fields_set: + _dict['signingKey'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceUpdateTargetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate"), + "signingKey": obj.get("signingKey") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_any.py b/zitadel_client/models/beta_feature_service_any.py new file mode 100644 index 00000000..87d1213d --- /dev/null +++ b/zitadel_client/models/beta_feature_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_connect_error.py b/zitadel_client/models/beta_feature_service_connect_error.py new file mode 100644 index 00000000..f5664f93 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_feature_service_any import BetaFeatureServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaFeatureServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaFeatureServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_details.py b/zitadel_client/models/beta_feature_service_details.py new file mode 100644 index 00000000..b528fee6 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_details.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceDetails(BaseModel): + """ + BetaFeatureServiceDetails + """ # noqa: E501 + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sequence": obj.get("sequence"), + "changeDate": obj.get("changeDate"), + "resourceOwner": obj.get("resourceOwner"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_feature_flag.py b/zitadel_client/models/beta_feature_service_feature_flag.py new file mode 100644 index 00000000..72322721 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_feature_flag.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_source import BetaFeatureServiceSource +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceFeatureFlag(BaseModel): + """ + FeatureFlag is a simple boolean Feature setting, without further payload. + """ # noqa: E501 + enabled: Optional[StrictBool] = None + source: Optional[BetaFeatureServiceSource] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceFeatureFlag from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceFeatureFlag from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "source": obj.get("source") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_get_instance_features_request.py b/zitadel_client/models/beta_feature_service_get_instance_features_request.py new file mode 100644 index 00000000..d11e4a42 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_get_instance_features_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceGetInstanceFeaturesRequest(BaseModel): + """ + BetaFeatureServiceGetInstanceFeaturesRequest + """ # noqa: E501 + inheritance: Optional[StrictBool] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetInstanceFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetInstanceFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inheritance": obj.get("inheritance") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_get_instance_features_response.py b/zitadel_client/models/beta_feature_service_get_instance_features_response.py new file mode 100644 index 00000000..40272a6f --- /dev/null +++ b/zitadel_client/models/beta_feature_service_get_instance_features_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from zitadel_client.models.beta_feature_service_feature_flag import BetaFeatureServiceFeatureFlag +from zitadel_client.models.beta_feature_service_improved_performance_feature_flag import BetaFeatureServiceImprovedPerformanceFeatureFlag +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceGetInstanceFeaturesResponse(BaseModel): + """ + BetaFeatureServiceGetInstanceFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + login_default_org: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="loginDefaultOrg") + oidc_trigger_introspection_projections: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="oidcTriggerIntrospectionProjections") + oidc_legacy_introspection: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="oidcLegacyIntrospection") + user_schema: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="userSchema") + oidc_token_exchange: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="oidcTokenExchange") + improved_performance: Optional[BetaFeatureServiceImprovedPerformanceFeatureFlag] = Field(default=None, alias="improvedPerformance") + web_key: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="webKey") + debug_oidc_parent_error: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="debugOidcParentError") + oidc_single_v1_session_termination: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="oidcSingleV1SessionTermination") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetInstanceFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of login_default_org + if self.login_default_org: + _dict['loginDefaultOrg'] = self.login_default_org.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_trigger_introspection_projections + if self.oidc_trigger_introspection_projections: + _dict['oidcTriggerIntrospectionProjections'] = self.oidc_trigger_introspection_projections.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_legacy_introspection + if self.oidc_legacy_introspection: + _dict['oidcLegacyIntrospection'] = self.oidc_legacy_introspection.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_schema + if self.user_schema: + _dict['userSchema'] = self.user_schema.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_token_exchange + if self.oidc_token_exchange: + _dict['oidcTokenExchange'] = self.oidc_token_exchange.to_dict() + # override the default output from pydantic by calling `to_dict()` of improved_performance + if self.improved_performance: + _dict['improvedPerformance'] = self.improved_performance.to_dict() + # override the default output from pydantic by calling `to_dict()` of web_key + if self.web_key: + _dict['webKey'] = self.web_key.to_dict() + # override the default output from pydantic by calling `to_dict()` of debug_oidc_parent_error + if self.debug_oidc_parent_error: + _dict['debugOidcParentError'] = self.debug_oidc_parent_error.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_single_v1_session_termination + if self.oidc_single_v1_session_termination: + _dict['oidcSingleV1SessionTermination'] = self.oidc_single_v1_session_termination.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetInstanceFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "loginDefaultOrg": BetaFeatureServiceFeatureFlag.from_dict(obj["loginDefaultOrg"]) if obj.get("loginDefaultOrg") is not None else None, + "oidcTriggerIntrospectionProjections": BetaFeatureServiceFeatureFlag.from_dict(obj["oidcTriggerIntrospectionProjections"]) if obj.get("oidcTriggerIntrospectionProjections") is not None else None, + "oidcLegacyIntrospection": BetaFeatureServiceFeatureFlag.from_dict(obj["oidcLegacyIntrospection"]) if obj.get("oidcLegacyIntrospection") is not None else None, + "userSchema": BetaFeatureServiceFeatureFlag.from_dict(obj["userSchema"]) if obj.get("userSchema") is not None else None, + "oidcTokenExchange": BetaFeatureServiceFeatureFlag.from_dict(obj["oidcTokenExchange"]) if obj.get("oidcTokenExchange") is not None else None, + "improvedPerformance": BetaFeatureServiceImprovedPerformanceFeatureFlag.from_dict(obj["improvedPerformance"]) if obj.get("improvedPerformance") is not None else None, + "webKey": BetaFeatureServiceFeatureFlag.from_dict(obj["webKey"]) if obj.get("webKey") is not None else None, + "debugOidcParentError": BetaFeatureServiceFeatureFlag.from_dict(obj["debugOidcParentError"]) if obj.get("debugOidcParentError") is not None else None, + "oidcSingleV1SessionTermination": BetaFeatureServiceFeatureFlag.from_dict(obj["oidcSingleV1SessionTermination"]) if obj.get("oidcSingleV1SessionTermination") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_get_organization_features_request.py b/zitadel_client/models/beta_feature_service_get_organization_features_request.py new file mode 100644 index 00000000..bb9bc9b0 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_get_organization_features_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceGetOrganizationFeaturesRequest(BaseModel): + """ + BetaFeatureServiceGetOrganizationFeaturesRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + inheritance: Optional[StrictBool] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetOrganizationFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetOrganizationFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "inheritance": obj.get("inheritance") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_get_organization_features_response.py b/zitadel_client/models/beta_feature_service_get_organization_features_response.py new file mode 100644 index 00000000..4613c9a9 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_get_organization_features_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceGetOrganizationFeaturesResponse(BaseModel): + """ + BetaFeatureServiceGetOrganizationFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetOrganizationFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetOrganizationFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_get_system_features_response.py b/zitadel_client/models/beta_feature_service_get_system_features_response.py new file mode 100644 index 00000000..d5da5520 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_get_system_features_response.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from zitadel_client.models.beta_feature_service_feature_flag import BetaFeatureServiceFeatureFlag +from zitadel_client.models.beta_feature_service_improved_performance_feature_flag import BetaFeatureServiceImprovedPerformanceFeatureFlag +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceGetSystemFeaturesResponse(BaseModel): + """ + BetaFeatureServiceGetSystemFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + login_default_org: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="loginDefaultOrg") + oidc_trigger_introspection_projections: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="oidcTriggerIntrospectionProjections") + oidc_legacy_introspection: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="oidcLegacyIntrospection") + user_schema: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="userSchema") + oidc_token_exchange: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="oidcTokenExchange") + improved_performance: Optional[BetaFeatureServiceImprovedPerformanceFeatureFlag] = Field(default=None, alias="improvedPerformance") + oidc_single_v1_session_termination: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="oidcSingleV1SessionTermination") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetSystemFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of login_default_org + if self.login_default_org: + _dict['loginDefaultOrg'] = self.login_default_org.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_trigger_introspection_projections + if self.oidc_trigger_introspection_projections: + _dict['oidcTriggerIntrospectionProjections'] = self.oidc_trigger_introspection_projections.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_legacy_introspection + if self.oidc_legacy_introspection: + _dict['oidcLegacyIntrospection'] = self.oidc_legacy_introspection.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_schema + if self.user_schema: + _dict['userSchema'] = self.user_schema.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_token_exchange + if self.oidc_token_exchange: + _dict['oidcTokenExchange'] = self.oidc_token_exchange.to_dict() + # override the default output from pydantic by calling `to_dict()` of improved_performance + if self.improved_performance: + _dict['improvedPerformance'] = self.improved_performance.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_single_v1_session_termination + if self.oidc_single_v1_session_termination: + _dict['oidcSingleV1SessionTermination'] = self.oidc_single_v1_session_termination.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetSystemFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "loginDefaultOrg": BetaFeatureServiceFeatureFlag.from_dict(obj["loginDefaultOrg"]) if obj.get("loginDefaultOrg") is not None else None, + "oidcTriggerIntrospectionProjections": BetaFeatureServiceFeatureFlag.from_dict(obj["oidcTriggerIntrospectionProjections"]) if obj.get("oidcTriggerIntrospectionProjections") is not None else None, + "oidcLegacyIntrospection": BetaFeatureServiceFeatureFlag.from_dict(obj["oidcLegacyIntrospection"]) if obj.get("oidcLegacyIntrospection") is not None else None, + "userSchema": BetaFeatureServiceFeatureFlag.from_dict(obj["userSchema"]) if obj.get("userSchema") is not None else None, + "oidcTokenExchange": BetaFeatureServiceFeatureFlag.from_dict(obj["oidcTokenExchange"]) if obj.get("oidcTokenExchange") is not None else None, + "improvedPerformance": BetaFeatureServiceImprovedPerformanceFeatureFlag.from_dict(obj["improvedPerformance"]) if obj.get("improvedPerformance") is not None else None, + "oidcSingleV1SessionTermination": BetaFeatureServiceFeatureFlag.from_dict(obj["oidcSingleV1SessionTermination"]) if obj.get("oidcSingleV1SessionTermination") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_get_user_features_request.py b/zitadel_client/models/beta_feature_service_get_user_features_request.py new file mode 100644 index 00000000..f70745c7 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_get_user_features_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceGetUserFeaturesRequest(BaseModel): + """ + BetaFeatureServiceGetUserFeaturesRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + inheritance: Optional[StrictBool] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetUserFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetUserFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "inheritance": obj.get("inheritance") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_get_user_features_response.py b/zitadel_client/models/beta_feature_service_get_user_features_response.py new file mode 100644 index 00000000..4f552258 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_get_user_features_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceGetUserFeaturesResponse(BaseModel): + """ + BetaFeatureServiceGetUserFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetUserFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetUserFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_improved_performance.py b/zitadel_client/models/beta_feature_service_improved_performance.py new file mode 100644 index 00000000..c81c477c --- /dev/null +++ b/zitadel_client/models/beta_feature_service_improved_performance.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaFeatureServiceImprovedPerformance(str, Enum): + """ + BetaFeatureServiceImprovedPerformance + """ + + """ + allowed enum values + """ + IMPROVED_PERFORMANCE_UNSPECIFIED = 'IMPROVED_PERFORMANCE_UNSPECIFIED' + IMPROVED_PERFORMANCE_ORG_BY_ID = 'IMPROVED_PERFORMANCE_ORG_BY_ID' + IMPROVED_PERFORMANCE_PROJECT_GRANT = 'IMPROVED_PERFORMANCE_PROJECT_GRANT' + IMPROVED_PERFORMANCE_PROJECT = 'IMPROVED_PERFORMANCE_PROJECT' + IMPROVED_PERFORMANCE_USER_GRANT = 'IMPROVED_PERFORMANCE_USER_GRANT' + IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED = 'IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaFeatureServiceImprovedPerformance from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/session_service_challenges_web_auth_n.py b/zitadel_client/models/beta_feature_service_improved_performance_feature_flag.py similarity index 74% rename from zitadel_client/models/session_service_challenges_web_auth_n.py rename to zitadel_client/models/beta_feature_service_improved_performance_feature_flag.py index 08a79dab..1df3583e 100644 --- a/zitadel_client/models/session_service_challenges_web_auth_n.py +++ b/zitadel_client/models/beta_feature_service_improved_performance_feature_flag.py @@ -19,14 +19,17 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_feature_service_improved_performance import BetaFeatureServiceImprovedPerformance +from zitadel_client.models.beta_feature_service_source import BetaFeatureServiceSource from typing import Optional, Set from typing_extensions import Self -class SessionServiceChallengesWebAuthN(BaseModel): +class BetaFeatureServiceImprovedPerformanceFeatureFlag(BaseModel): """ - SessionServiceChallengesWebAuthN + BetaFeatureServiceImprovedPerformanceFeatureFlag """ # 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") + execution_paths: Optional[List[BetaFeatureServiceImprovedPerformance]] = Field(default=None, alias="executionPaths") + source: Optional[BetaFeatureServiceSource] = None model_config = ConfigDict( populate_by_name=True, @@ -46,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceChallengesWebAuthN from a JSON string""" + """Create an instance of BetaFeatureServiceImprovedPerformanceFeatureFlag from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceChallengesWebAuthN from a dict""" + """Create an instance of BetaFeatureServiceImprovedPerformanceFeatureFlag from a dict""" if obj is None: return None @@ -79,7 +82,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "publicKeyCredentialRequestOptions": obj.get("publicKeyCredentialRequestOptions") + "executionPaths": obj.get("executionPaths"), + "source": obj.get("source") }) return _obj diff --git a/zitadel_client/models/beta_feature_service_reset_instance_features_response.py b/zitadel_client/models/beta_feature_service_reset_instance_features_response.py new file mode 100644 index 00000000..c6bb53f3 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_reset_instance_features_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceResetInstanceFeaturesResponse(BaseModel): + """ + BetaFeatureServiceResetInstanceFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetInstanceFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetInstanceFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_reset_organization_features_request.py b/zitadel_client/models/beta_feature_service_reset_organization_features_request.py new file mode 100644 index 00000000..7ccf4645 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_reset_organization_features_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceResetOrganizationFeaturesRequest(BaseModel): + """ + BetaFeatureServiceResetOrganizationFeaturesRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetOrganizationFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetOrganizationFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_reset_organization_features_response.py b/zitadel_client/models/beta_feature_service_reset_organization_features_response.py new file mode 100644 index 00000000..bf65fd4f --- /dev/null +++ b/zitadel_client/models/beta_feature_service_reset_organization_features_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceResetOrganizationFeaturesResponse(BaseModel): + """ + BetaFeatureServiceResetOrganizationFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetOrganizationFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetOrganizationFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_reset_system_features_response.py b/zitadel_client/models/beta_feature_service_reset_system_features_response.py new file mode 100644 index 00000000..a0f5ae70 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_reset_system_features_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceResetSystemFeaturesResponse(BaseModel): + """ + BetaFeatureServiceResetSystemFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetSystemFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetSystemFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_reset_user_features_request.py b/zitadel_client/models/beta_feature_service_reset_user_features_request.py new file mode 100644 index 00000000..b9c0f5e9 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_reset_user_features_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceResetUserFeaturesRequest(BaseModel): + """ + BetaFeatureServiceResetUserFeaturesRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetUserFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetUserFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_reset_user_features_response.py b/zitadel_client/models/beta_feature_service_reset_user_features_response.py new file mode 100644 index 00000000..0b2e6661 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_reset_user_features_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceResetUserFeaturesResponse(BaseModel): + """ + BetaFeatureServiceResetUserFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetUserFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetUserFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_instance_features_request.py b/zitadel_client/models/beta_feature_service_set_instance_features_request.py new file mode 100644 index 00000000..30a448a1 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_instance_features_request.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_feature_service_improved_performance import BetaFeatureServiceImprovedPerformance +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetInstanceFeaturesRequest(BaseModel): + """ + BetaFeatureServiceSetInstanceFeaturesRequest + """ # noqa: E501 + login_default_org: Optional[StrictBool] = Field(default=None, alias="loginDefaultOrg") + oidc_trigger_introspection_projections: Optional[StrictBool] = Field(default=None, alias="oidcTriggerIntrospectionProjections") + oidc_legacy_introspection: Optional[StrictBool] = Field(default=None, alias="oidcLegacyIntrospection") + user_schema: Optional[StrictBool] = Field(default=None, alias="userSchema") + oidc_token_exchange: Optional[StrictBool] = Field(default=None, alias="oidcTokenExchange") + improved_performance: Optional[List[BetaFeatureServiceImprovedPerformance]] = Field(default=None, alias="improvedPerformance") + web_key: Optional[StrictBool] = Field(default=None, alias="webKey") + debug_oidc_parent_error: Optional[StrictBool] = Field(default=None, alias="debugOidcParentError") + oidc_single_v1_session_termination: Optional[StrictBool] = Field(default=None, alias="oidcSingleV1SessionTermination") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetInstanceFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if login_default_org (nullable) is None + # and model_fields_set contains the field + if self.login_default_org is None and "login_default_org" in self.model_fields_set: + _dict['loginDefaultOrg'] = None + + # set to None if oidc_trigger_introspection_projections (nullable) is None + # and model_fields_set contains the field + if self.oidc_trigger_introspection_projections is None and "oidc_trigger_introspection_projections" in self.model_fields_set: + _dict['oidcTriggerIntrospectionProjections'] = None + + # set to None if oidc_legacy_introspection (nullable) is None + # and model_fields_set contains the field + if self.oidc_legacy_introspection is None and "oidc_legacy_introspection" in self.model_fields_set: + _dict['oidcLegacyIntrospection'] = None + + # set to None if user_schema (nullable) is None + # and model_fields_set contains the field + if self.user_schema is None and "user_schema" in self.model_fields_set: + _dict['userSchema'] = None + + # set to None if oidc_token_exchange (nullable) is None + # and model_fields_set contains the field + if self.oidc_token_exchange is None and "oidc_token_exchange" in self.model_fields_set: + _dict['oidcTokenExchange'] = None + + # set to None if web_key (nullable) is None + # and model_fields_set contains the field + if self.web_key is None and "web_key" in self.model_fields_set: + _dict['webKey'] = None + + # set to None if debug_oidc_parent_error (nullable) is None + # and model_fields_set contains the field + if self.debug_oidc_parent_error is None and "debug_oidc_parent_error" in self.model_fields_set: + _dict['debugOidcParentError'] = None + + # set to None if oidc_single_v1_session_termination (nullable) is None + # and model_fields_set contains the field + if self.oidc_single_v1_session_termination is None and "oidc_single_v1_session_termination" in self.model_fields_set: + _dict['oidcSingleV1SessionTermination'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetInstanceFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginDefaultOrg": obj.get("loginDefaultOrg"), + "oidcTriggerIntrospectionProjections": obj.get("oidcTriggerIntrospectionProjections"), + "oidcLegacyIntrospection": obj.get("oidcLegacyIntrospection"), + "userSchema": obj.get("userSchema"), + "oidcTokenExchange": obj.get("oidcTokenExchange"), + "improvedPerformance": obj.get("improvedPerformance"), + "webKey": obj.get("webKey"), + "debugOidcParentError": obj.get("debugOidcParentError"), + "oidcSingleV1SessionTermination": obj.get("oidcSingleV1SessionTermination") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_instance_features_response.py b/zitadel_client/models/beta_feature_service_set_instance_features_response.py new file mode 100644 index 00000000..7b4979c5 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_instance_features_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetInstanceFeaturesResponse(BaseModel): + """ + BetaFeatureServiceSetInstanceFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetInstanceFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetInstanceFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_organization_features_request.py b/zitadel_client/models/beta_feature_service_set_organization_features_request.py new file mode 100644 index 00000000..ce750737 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_organization_features_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetOrganizationFeaturesRequest(BaseModel): + """ + BetaFeatureServiceSetOrganizationFeaturesRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetOrganizationFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetOrganizationFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_organization_features_response.py b/zitadel_client/models/beta_feature_service_set_organization_features_response.py new file mode 100644 index 00000000..79f13746 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_organization_features_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetOrganizationFeaturesResponse(BaseModel): + """ + BetaFeatureServiceSetOrganizationFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetOrganizationFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetOrganizationFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_system_features_request.py b/zitadel_client/models/beta_feature_service_set_system_features_request.py new file mode 100644 index 00000000..e7ac2bb0 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_system_features_request.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_feature_service_improved_performance import BetaFeatureServiceImprovedPerformance +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetSystemFeaturesRequest(BaseModel): + """ + BetaFeatureServiceSetSystemFeaturesRequest + """ # noqa: E501 + login_default_org: Optional[StrictBool] = Field(default=None, alias="loginDefaultOrg") + oidc_trigger_introspection_projections: Optional[StrictBool] = Field(default=None, alias="oidcTriggerIntrospectionProjections") + oidc_legacy_introspection: Optional[StrictBool] = Field(default=None, alias="oidcLegacyIntrospection") + user_schema: Optional[StrictBool] = Field(default=None, alias="userSchema") + oidc_token_exchange: Optional[StrictBool] = Field(default=None, alias="oidcTokenExchange") + improved_performance: Optional[List[BetaFeatureServiceImprovedPerformance]] = Field(default=None, alias="improvedPerformance") + oidc_single_v1_session_termination: Optional[StrictBool] = Field(default=None, alias="oidcSingleV1SessionTermination") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetSystemFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if login_default_org (nullable) is None + # and model_fields_set contains the field + if self.login_default_org is None and "login_default_org" in self.model_fields_set: + _dict['loginDefaultOrg'] = None + + # set to None if oidc_trigger_introspection_projections (nullable) is None + # and model_fields_set contains the field + if self.oidc_trigger_introspection_projections is None and "oidc_trigger_introspection_projections" in self.model_fields_set: + _dict['oidcTriggerIntrospectionProjections'] = None + + # set to None if oidc_legacy_introspection (nullable) is None + # and model_fields_set contains the field + if self.oidc_legacy_introspection is None and "oidc_legacy_introspection" in self.model_fields_set: + _dict['oidcLegacyIntrospection'] = None + + # set to None if user_schema (nullable) is None + # and model_fields_set contains the field + if self.user_schema is None and "user_schema" in self.model_fields_set: + _dict['userSchema'] = None + + # set to None if oidc_token_exchange (nullable) is None + # and model_fields_set contains the field + if self.oidc_token_exchange is None and "oidc_token_exchange" in self.model_fields_set: + _dict['oidcTokenExchange'] = None + + # set to None if oidc_single_v1_session_termination (nullable) is None + # and model_fields_set contains the field + if self.oidc_single_v1_session_termination is None and "oidc_single_v1_session_termination" in self.model_fields_set: + _dict['oidcSingleV1SessionTermination'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetSystemFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginDefaultOrg": obj.get("loginDefaultOrg"), + "oidcTriggerIntrospectionProjections": obj.get("oidcTriggerIntrospectionProjections"), + "oidcLegacyIntrospection": obj.get("oidcLegacyIntrospection"), + "userSchema": obj.get("userSchema"), + "oidcTokenExchange": obj.get("oidcTokenExchange"), + "improvedPerformance": obj.get("improvedPerformance"), + "oidcSingleV1SessionTermination": obj.get("oidcSingleV1SessionTermination") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_system_features_response.py b/zitadel_client/models/beta_feature_service_set_system_features_response.py new file mode 100644 index 00000000..bbbb50cd --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_system_features_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetSystemFeaturesResponse(BaseModel): + """ + BetaFeatureServiceSetSystemFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetSystemFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetSystemFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_user_feature_request.py b/zitadel_client/models/beta_feature_service_set_user_feature_request.py new file mode 100644 index 00000000..bea99de7 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_user_feature_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetUserFeatureRequest(BaseModel): + """ + BetaFeatureServiceSetUserFeatureRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetUserFeatureRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetUserFeatureRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_user_features_response.py b/zitadel_client/models/beta_feature_service_set_user_features_response.py new file mode 100644 index 00000000..93d7dd4c --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_user_features_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetUserFeaturesResponse(BaseModel): + """ + BetaFeatureServiceSetUserFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetUserFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetUserFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_source.py b/zitadel_client/models/beta_feature_service_source.py new file mode 100644 index 00000000..9d9b9924 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_source.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaFeatureServiceSource(str, Enum): + """ + BetaFeatureServiceSource + """ + + """ + allowed enum values + """ + SOURCE_UNSPECIFIED = 'SOURCE_UNSPECIFIED' + SOURCE_SYSTEM = 'SOURCE_SYSTEM' + SOURCE_INSTANCE = 'SOURCE_INSTANCE' + SOURCE_ORGANIZATION = 'SOURCE_ORGANIZATION' + SOURCE_PROJECT = 'SOURCE_PROJECT' + SOURCE_APP = 'SOURCE_APP' + SOURCE_USER = 'SOURCE_USER' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaFeatureServiceSource from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_oidc_service_any.py b/zitadel_client/models/beta_oidc_service_any.py new file mode 100644 index 00000000..83a6830a --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_auth_request.py b/zitadel_client/models/beta_oidc_service_auth_request.py new file mode 100644 index 00000000..a258f54d --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_auth_request.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_oidc_service_prompt import BetaOIDCServicePrompt +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceAuthRequest(BaseModel): + """ + BetaOIDCServiceAuthRequest + """ # noqa: E501 + id: Optional[StrictStr] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + client_id: Optional[StrictStr] = Field(default=None, alias="clientId") + scope: Optional[List[StrictStr]] = None + redirect_uri: Optional[StrictStr] = Field(default=None, alias="redirectUri") + prompt: Optional[List[BetaOIDCServicePrompt]] = None + ui_locales: Optional[List[StrictStr]] = Field(default=None, alias="uiLocales") + login_hint: Optional[StrictStr] = Field(default=None, alias="loginHint") + max_age: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="maxAge") + hint_user_id: Optional[StrictStr] = Field(default=None, alias="hintUserId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceAuthRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if login_hint (nullable) is None + # and model_fields_set contains the field + if self.login_hint is None and "login_hint" in self.model_fields_set: + _dict['loginHint'] = None + + # set to None if hint_user_id (nullable) is None + # and model_fields_set contains the field + if self.hint_user_id is None and "hint_user_id" in self.model_fields_set: + _dict['hintUserId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceAuthRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "clientId": obj.get("clientId"), + "scope": obj.get("scope"), + "redirectUri": obj.get("redirectUri"), + "prompt": obj.get("prompt"), + "uiLocales": obj.get("uiLocales"), + "loginHint": obj.get("loginHint"), + "maxAge": obj.get("maxAge"), + "hintUserId": obj.get("hintUserId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_authorization_error.py b/zitadel_client/models/beta_oidc_service_authorization_error.py new file mode 100644 index 00000000..33edb219 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_authorization_error.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_oidc_service_error_reason import BetaOIDCServiceErrorReason +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceAuthorizationError(BaseModel): + """ + BetaOIDCServiceAuthorizationError + """ # noqa: E501 + error: Optional[BetaOIDCServiceErrorReason] = None + error_description: Optional[StrictStr] = Field(default=None, alias="errorDescription") + error_uri: Optional[StrictStr] = Field(default=None, alias="errorUri") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceAuthorizationError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if error_description (nullable) is None + # and model_fields_set contains the field + if self.error_description is None and "error_description" in self.model_fields_set: + _dict['errorDescription'] = None + + # set to None if error_uri (nullable) is None + # and model_fields_set contains the field + if self.error_uri is None and "error_uri" in self.model_fields_set: + _dict['errorUri'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceAuthorizationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorDescription": obj.get("errorDescription"), + "errorUri": obj.get("errorUri") + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_connect_error.py b/zitadel_client/models/beta_oidc_service_connect_error.py new file mode 100644 index 00000000..5e610640 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_oidc_service_any import BetaOIDCServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaOIDCServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaOIDCServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_create_callback_request.py b/zitadel_client/models/beta_oidc_service_create_callback_request.py new file mode 100644 index 00000000..02d09744 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_create_callback_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.error2 import Error2 +from zitadel_client.models.session2 import Session2 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAOIDCSERVICECREATECALLBACKREQUEST_ONE_OF_SCHEMAS = ["Error2", "Session2"] + +class BetaOIDCServiceCreateCallbackRequest(BaseModel): + """ + BetaOIDCServiceCreateCallbackRequest + """ + # data type: Error2 + oneof_schema_1_validator: Optional[Error2] = None + # data type: Session2 + oneof_schema_2_validator: Optional[Session2] = None + actual_instance: Optional[Union[Error2, Session2]] = None + one_of_schemas: Set[str] = { "Error2", "Session2" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaOIDCServiceCreateCallbackRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: Error2 + if not isinstance(v, Error2): + error_messages.append(f"Error! Input type `{type(v)}` is not `Error2`") + else: + match += 1 + # validate data type: Session2 + if not isinstance(v, Session2): + error_messages.append(f"Error! Input type `{type(v)}` is not `Session2`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaOIDCServiceCreateCallbackRequest with oneOf schemas: Error2, Session2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaOIDCServiceCreateCallbackRequest with oneOf schemas: Error2, Session2. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Error2 + try: + instance.actual_instance = Error2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Session2 + try: + instance.actual_instance = Session2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaOIDCServiceCreateCallbackRequest with oneOf schemas: Error2, Session2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaOIDCServiceCreateCallbackRequest with oneOf schemas: Error2, Session2. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Error2, Session2]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/action_service_beta_create_target_response.py b/zitadel_client/models/beta_oidc_service_create_callback_response.py similarity index 73% rename from zitadel_client/models/action_service_beta_create_target_response.py rename to zitadel_client/models/beta_oidc_service_create_callback_response.py index d13b9481..a92530b9 100644 --- a/zitadel_client/models/action_service_beta_create_target_response.py +++ b/zitadel_client/models/beta_oidc_service_create_callback_response.py @@ -17,19 +17,18 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_oidc_service_details import BetaOIDCServiceDetails from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaCreateTargetResponse(BaseModel): +class BetaOIDCServiceCreateCallbackResponse(BaseModel): """ - ActionServiceBetaCreateTargetResponse + BetaOIDCServiceCreateCallbackResponse """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the newly created target.") - creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the target creation.", alias="creationDate") - signing_key: Optional[StrictStr] = Field(default=None, description="Key used to sign and check payload sent to the target.", alias="signingKey") + details: Optional[BetaOIDCServiceDetails] = None + callback_url: Optional[StrictStr] = Field(default=None, alias="callbackUrl") model_config = ConfigDict( populate_by_name=True, @@ -49,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaCreateTargetResponse from a JSON string""" + """Create an instance of BetaOIDCServiceCreateCallbackResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,11 +69,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaCreateTargetResponse from a dict""" + """Create an instance of BetaOIDCServiceCreateCallbackResponse from a dict""" if obj is None: return None @@ -82,9 +84,8 @@ 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"), - "signingKey": obj.get("signingKey") + "details": BetaOIDCServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "callbackUrl": obj.get("callbackUrl") }) return _obj diff --git a/zitadel_client/models/beta_oidc_service_details.py b/zitadel_client/models/beta_oidc_service_details.py new file mode 100644 index 00000000..78077c97 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_details.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceDetails(BaseModel): + """ + BetaOIDCServiceDetails + """ # noqa: E501 + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sequence": obj.get("sequence"), + "changeDate": obj.get("changeDate"), + "resourceOwner": obj.get("resourceOwner"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_error_reason.py b/zitadel_client/models/beta_oidc_service_error_reason.py new file mode 100644 index 00000000..255eaa12 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_error_reason.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaOIDCServiceErrorReason(str, Enum): + """ + BetaOIDCServiceErrorReason + """ + + """ + allowed enum values + """ + ERROR_REASON_UNSPECIFIED = 'ERROR_REASON_UNSPECIFIED' + ERROR_REASON_INVALID_REQUEST = 'ERROR_REASON_INVALID_REQUEST' + ERROR_REASON_UNAUTHORIZED_CLIENT = 'ERROR_REASON_UNAUTHORIZED_CLIENT' + ERROR_REASON_ACCESS_DENIED = 'ERROR_REASON_ACCESS_DENIED' + ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE = 'ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE' + ERROR_REASON_INVALID_SCOPE = 'ERROR_REASON_INVALID_SCOPE' + ERROR_REASON_SERVER_ERROR = 'ERROR_REASON_SERVER_ERROR' + ERROR_REASON_TEMPORARY_UNAVAILABLE = 'ERROR_REASON_TEMPORARY_UNAVAILABLE' + ERROR_REASON_INTERACTION_REQUIRED = 'ERROR_REASON_INTERACTION_REQUIRED' + ERROR_REASON_LOGIN_REQUIRED = 'ERROR_REASON_LOGIN_REQUIRED' + ERROR_REASON_ACCOUNT_SELECTION_REQUIRED = 'ERROR_REASON_ACCOUNT_SELECTION_REQUIRED' + ERROR_REASON_CONSENT_REQUIRED = 'ERROR_REASON_CONSENT_REQUIRED' + ERROR_REASON_INVALID_REQUEST_URI = 'ERROR_REASON_INVALID_REQUEST_URI' + ERROR_REASON_INVALID_REQUEST_OBJECT = 'ERROR_REASON_INVALID_REQUEST_OBJECT' + ERROR_REASON_REQUEST_NOT_SUPPORTED = 'ERROR_REASON_REQUEST_NOT_SUPPORTED' + ERROR_REASON_REQUEST_URI_NOT_SUPPORTED = 'ERROR_REASON_REQUEST_URI_NOT_SUPPORTED' + ERROR_REASON_REGISTRATION_NOT_SUPPORTED = 'ERROR_REASON_REGISTRATION_NOT_SUPPORTED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaOIDCServiceErrorReason from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_oidc_service_get_auth_request_request.py b/zitadel_client/models/beta_oidc_service_get_auth_request_request.py new file mode 100644 index 00000000..77f12ffb --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_get_auth_request_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceGetAuthRequestRequest(BaseModel): + """ + BetaOIDCServiceGetAuthRequestRequest + """ # noqa: E501 + auth_request_id: Optional[StrictStr] = Field(default=None, alias="authRequestId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceGetAuthRequestRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceGetAuthRequestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authRequestId": obj.get("authRequestId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_get_auth_request_response.py b/zitadel_client/models/beta_oidc_service_get_auth_request_response.py new file mode 100644 index 00000000..b671bcbd --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_get_auth_request_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_oidc_service_auth_request import BetaOIDCServiceAuthRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceGetAuthRequestResponse(BaseModel): + """ + BetaOIDCServiceGetAuthRequestResponse + """ # noqa: E501 + auth_request: Optional[BetaOIDCServiceAuthRequest] = Field(default=None, alias="authRequest") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceGetAuthRequestResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of auth_request + if self.auth_request: + _dict['authRequest'] = self.auth_request.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceGetAuthRequestResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authRequest": BetaOIDCServiceAuthRequest.from_dict(obj["authRequest"]) if obj.get("authRequest") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_prompt.py b/zitadel_client/models/beta_oidc_service_prompt.py new file mode 100644 index 00000000..62841f86 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_prompt.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaOIDCServicePrompt(str, Enum): + """ + BetaOIDCServicePrompt + """ + + """ + allowed enum values + """ + PROMPT_UNSPECIFIED = 'PROMPT_UNSPECIFIED' + PROMPT_NONE = 'PROMPT_NONE' + PROMPT_LOGIN = 'PROMPT_LOGIN' + PROMPT_CONSENT = 'PROMPT_CONSENT' + PROMPT_SELECT_ACCOUNT = 'PROMPT_SELECT_ACCOUNT' + PROMPT_CREATE = 'PROMPT_CREATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaOIDCServicePrompt from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_oidc_service_session.py b/zitadel_client/models/beta_oidc_service_session.py new file mode 100644 index 00000000..fc1e6516 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_session.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceSession(BaseModel): + """ + BetaOIDCServiceSession + """ # noqa: E501 + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceSession from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceSession from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sessionId": obj.get("sessionId"), + "sessionToken": obj.get("sessionToken") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_add_human_user_request.py b/zitadel_client/models/beta_organization_service_add_human_user_request.py new file mode 100644 index 00000000..48a2c774 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_add_human_user_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.hashed_password3 import HashedPassword3 +from zitadel_client.models.password3 import Password3 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAORGANIZATIONSERVICEADDHUMANUSERREQUEST_ONE_OF_SCHEMAS = ["HashedPassword3", "Password3"] + +class BetaOrganizationServiceAddHumanUserRequest(BaseModel): + """ + BetaOrganizationServiceAddHumanUserRequest + """ + # data type: HashedPassword3 + oneof_schema_1_validator: Optional[HashedPassword3] = None + # data type: Password3 + oneof_schema_2_validator: Optional[Password3] = None + actual_instance: Optional[Union[HashedPassword3, Password3]] = None + one_of_schemas: Set[str] = { "HashedPassword3", "Password3" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaOrganizationServiceAddHumanUserRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: HashedPassword3 + if not isinstance(v, HashedPassword3): + error_messages.append(f"Error! Input type `{type(v)}` is not `HashedPassword3`") + else: + match += 1 + # validate data type: Password3 + if not isinstance(v, Password3): + error_messages.append(f"Error! Input type `{type(v)}` is not `Password3`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaOrganizationServiceAddHumanUserRequest with oneOf schemas: HashedPassword3, Password3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaOrganizationServiceAddHumanUserRequest with oneOf schemas: HashedPassword3, Password3. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into HashedPassword3 + try: + instance.actual_instance = HashedPassword3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Password3 + try: + instance.actual_instance = Password3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaOrganizationServiceAddHumanUserRequest with oneOf schemas: HashedPassword3, Password3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaOrganizationServiceAddHumanUserRequest with oneOf schemas: HashedPassword3, Password3. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], HashedPassword3, Password3]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/oidc_service_rpc_status.py b/zitadel_client/models/beta_organization_service_add_organization_request.py similarity index 71% rename from zitadel_client/models/oidc_service_rpc_status.py rename to zitadel_client/models/beta_organization_service_add_organization_request.py index 5dbf6d41..04facbc2 100644 --- a/zitadel_client/models/oidc_service_rpc_status.py +++ b/zitadel_client/models/beta_organization_service_add_organization_request.py @@ -17,19 +17,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.oidc_service_protobuf_any import OIDCServiceProtobufAny +from zitadel_client.models.beta_organization_service_admin import BetaOrganizationServiceAdmin from typing import Optional, Set from typing_extensions import Self -class OIDCServiceRpcStatus(BaseModel): +class BetaOrganizationServiceAddOrganizationRequest(BaseModel): """ - OIDCServiceRpcStatus + BetaOrganizationServiceAddOrganizationRequest """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[OIDCServiceProtobufAny]] = None + name: StrictStr + admins: Optional[List[BetaOrganizationServiceAdmin]] = None model_config = ConfigDict( populate_by_name=True, @@ -49,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OIDCServiceRpcStatus from a JSON string""" + """Create an instance of BetaOrganizationServiceAddOrganizationRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +69,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) + # override the default output from pydantic by calling `to_dict()` of each item in admins (list) _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + if self.admins: + for _item_admins in self.admins: + if _item_admins: + _items.append(_item_admins.to_dict()) + _dict['admins'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OIDCServiceRpcStatus from a dict""" + """Create an instance of BetaOrganizationServiceAddOrganizationRequest from a dict""" if obj is None: return None @@ -89,9 +88,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [OIDCServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "name": obj.get("name"), + "admins": [BetaOrganizationServiceAdmin.from_dict(_item) for _item in obj["admins"]] if obj.get("admins") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_organization_service_add_organization_response.py b/zitadel_client/models/beta_organization_service_add_organization_response.py new file mode 100644 index 00000000..57746d3c --- /dev/null +++ b/zitadel_client/models/beta_organization_service_add_organization_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_organization_service_created_admin import BetaOrganizationServiceCreatedAdmin +from zitadel_client.models.beta_organization_service_details import BetaOrganizationServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceAddOrganizationResponse(BaseModel): + """ + BetaOrganizationServiceAddOrganizationResponse + """ # noqa: E501 + details: Optional[BetaOrganizationServiceDetails] = None + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + created_admins: Optional[List[BetaOrganizationServiceCreatedAdmin]] = Field(default=None, alias="createdAdmins") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAddOrganizationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in created_admins (list) + _items = [] + if self.created_admins: + for _item_created_admins in self.created_admins: + if _item_created_admins: + _items.append(_item_created_admins.to_dict()) + _dict['createdAdmins'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAddOrganizationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaOrganizationServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "organizationId": obj.get("organizationId"), + "createdAdmins": [BetaOrganizationServiceCreatedAdmin.from_dict(_item) for _item in obj["createdAdmins"]] if obj.get("createdAdmins") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_admin.py b/zitadel_client/models/beta_organization_service_admin.py new file mode 100644 index 00000000..e018dfef --- /dev/null +++ b/zitadel_client/models/beta_organization_service_admin.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.human3 import Human3 +from zitadel_client.models.user_id import UserId +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAORGANIZATIONSERVICEADMIN_ONE_OF_SCHEMAS = ["Human3", "UserId"] + +class BetaOrganizationServiceAdmin(BaseModel): + """ + BetaOrganizationServiceAdmin + """ + # data type: Human3 + oneof_schema_1_validator: Optional[Human3] = None + # data type: UserId + oneof_schema_2_validator: Optional[UserId] = None + actual_instance: Optional[Union[Human3, UserId]] = None + one_of_schemas: Set[str] = { "Human3", "UserId" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaOrganizationServiceAdmin.model_construct() + error_messages = [] + match = 0 + # validate data type: Human3 + if not isinstance(v, Human3): + error_messages.append(f"Error! Input type `{type(v)}` is not `Human3`") + else: + match += 1 + # validate data type: UserId + if not isinstance(v, UserId): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserId`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaOrganizationServiceAdmin with oneOf schemas: Human3, UserId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaOrganizationServiceAdmin with oneOf schemas: Human3, UserId. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Human3 + try: + instance.actual_instance = Human3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserId + try: + instance.actual_instance = UserId.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaOrganizationServiceAdmin with oneOf schemas: Human3, UserId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaOrganizationServiceAdmin with oneOf schemas: Human3, UserId. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Human3, UserId]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_organization_service_any.py b/zitadel_client/models/beta_organization_service_any.py new file mode 100644 index 00000000..4625bbdb --- /dev/null +++ b/zitadel_client/models/beta_organization_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_connect_error.py b/zitadel_client/models/beta_organization_service_connect_error.py new file mode 100644 index 00000000..2783b1bb --- /dev/null +++ b/zitadel_client/models/beta_organization_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_organization_service_any import BetaOrganizationServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaOrganizationServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaOrganizationServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_created_admin.py b/zitadel_client/models/beta_organization_service_created_admin.py new file mode 100644 index 00000000..54cc3574 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_created_admin.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceCreatedAdmin(BaseModel): + """ + BetaOrganizationServiceCreatedAdmin + """ # noqa: E501 + 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") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceCreatedAdmin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceCreatedAdmin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "emailCode": obj.get("emailCode"), + "phoneCode": obj.get("phoneCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_details.py b/zitadel_client/models/beta_organization_service_details.py new file mode 100644 index 00000000..a2bd081d --- /dev/null +++ b/zitadel_client/models/beta_organization_service_details.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceDetails(BaseModel): + """ + BetaOrganizationServiceDetails + """ # noqa: E501 + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sequence": obj.get("sequence"), + "changeDate": obj.get("changeDate"), + "resourceOwner": obj.get("resourceOwner"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_gender.py b/zitadel_client/models/beta_organization_service_gender.py new file mode 100644 index 00000000..32d9fa4e --- /dev/null +++ b/zitadel_client/models/beta_organization_service_gender.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaOrganizationServiceGender(str, Enum): + """ + BetaOrganizationServiceGender + """ + + """ + allowed enum values + """ + GENDER_UNSPECIFIED = 'GENDER_UNSPECIFIED' + GENDER_FEMALE = 'GENDER_FEMALE' + GENDER_MALE = 'GENDER_MALE' + GENDER_DIVERSE = 'GENDER_DIVERSE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaOrganizationServiceGender from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_organization_service_hashed_password.py b/zitadel_client/models/beta_organization_service_hashed_password.py new file mode 100644 index 00000000..22ad7d59 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_hashed_password.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceHashedPassword(BaseModel): + """ + BetaOrganizationServiceHashedPassword + """ # noqa: E501 + hash: StrictStr + change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceHashedPassword from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceHashedPassword from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hash": obj.get("hash"), + "changeRequired": obj.get("changeRequired") + }) + return _obj + + diff --git a/zitadel_client/models/organization_service_add_organization_response_created_admin.py b/zitadel_client/models/beta_organization_service_idp_link.py similarity index 78% rename from zitadel_client/models/organization_service_add_organization_response_created_admin.py rename to zitadel_client/models/beta_organization_service_idp_link.py index bb2a7eee..1cd4e61e 100644 --- a/zitadel_client/models/organization_service_add_organization_response_created_admin.py +++ b/zitadel_client/models/beta_organization_service_idp_link.py @@ -18,17 +18,17 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class OrganizationServiceAddOrganizationResponseCreatedAdmin(BaseModel): +class BetaOrganizationServiceIDPLink(BaseModel): """ - OrganizationServiceAddOrganizationResponseCreatedAdmin + BetaOrganizationServiceIDPLink """ # noqa: E501 + idp_id: Optional[StrictStr] = Field(default=None, alias="idpId") 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") + user_name: Optional[StrictStr] = Field(default=None, alias="userName") model_config = ConfigDict( populate_by_name=True, @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationServiceAddOrganizationResponseCreatedAdmin from a JSON string""" + """Create an instance of BetaOrganizationServiceIDPLink from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationServiceAddOrganizationResponseCreatedAdmin from a dict""" + """Create an instance of BetaOrganizationServiceIDPLink from a dict""" if obj is None: return None @@ -81,9 +81,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "idpId": obj.get("idpId"), "userId": obj.get("userId"), - "emailCode": obj.get("emailCode"), - "phoneCode": obj.get("phoneCode") + "userName": obj.get("userName") }) return _obj diff --git a/zitadel_client/models/beta_organization_service_organization.py b/zitadel_client/models/beta_organization_service_organization.py new file mode 100644 index 00000000..94b5079d --- /dev/null +++ b/zitadel_client/models/beta_organization_service_organization.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.org_domain import OrgDomain +from zitadel_client.models.org_id import OrgId +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAORGANIZATIONSERVICEORGANIZATION_ONE_OF_SCHEMAS = ["OrgDomain", "OrgId"] + +class BetaOrganizationServiceOrganization(BaseModel): + """ + BetaOrganizationServiceOrganization + """ + # data type: OrgDomain + oneof_schema_1_validator: Optional[OrgDomain] = None + # data type: OrgId + oneof_schema_2_validator: Optional[OrgId] = None + actual_instance: Optional[Union[OrgDomain, OrgId]] = None + one_of_schemas: Set[str] = { "OrgDomain", "OrgId" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaOrganizationServiceOrganization.model_construct() + error_messages = [] + match = 0 + # validate data type: OrgDomain + if not isinstance(v, OrgDomain): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrgDomain`") + else: + match += 1 + # validate data type: OrgId + if not isinstance(v, OrgId): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrgId`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaOrganizationServiceOrganization with oneOf schemas: OrgDomain, OrgId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaOrganizationServiceOrganization with oneOf schemas: OrgDomain, OrgId. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into OrgDomain + try: + instance.actual_instance = OrgDomain.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OrgId + try: + instance.actual_instance = OrgId.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaOrganizationServiceOrganization with oneOf schemas: OrgDomain, OrgId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaOrganizationServiceOrganization with oneOf schemas: OrgDomain, OrgId. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], OrgDomain, OrgId]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_organization_service_password.py b/zitadel_client/models/beta_organization_service_password.py new file mode 100644 index 00000000..779fb1be --- /dev/null +++ b/zitadel_client/models/beta_organization_service_password.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServicePassword(BaseModel): + """ + BetaOrganizationServicePassword + """ # noqa: E501 + password: StrictStr + change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServicePassword from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServicePassword from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": obj.get("password"), + "changeRequired": obj.get("changeRequired") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_send_email_verification_code.py b/zitadel_client/models/beta_organization_service_send_email_verification_code.py new file mode 100644 index 00000000..7d3f1236 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_send_email_verification_code.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceSendEmailVerificationCode(BaseModel): + """ + BetaOrganizationServiceSendEmailVerificationCode + """ # noqa: E501 + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSendEmailVerificationCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSendEmailVerificationCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_set_human_email.py b/zitadel_client/models/beta_organization_service_set_human_email.py new file mode 100644 index 00000000..61449ca1 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_set_human_email.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.is_verified import IsVerified +from zitadel_client.models.return_code13 import ReturnCode13 +from zitadel_client.models.send_code9 import SendCode9 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAORGANIZATIONSERVICESETHUMANEMAIL_ONE_OF_SCHEMAS = ["IsVerified", "ReturnCode13", "SendCode9"] + +class BetaOrganizationServiceSetHumanEmail(BaseModel): + """ + BetaOrganizationServiceSetHumanEmail + """ + # data type: IsVerified + oneof_schema_1_validator: Optional[IsVerified] = None + # data type: ReturnCode13 + oneof_schema_2_validator: Optional[ReturnCode13] = None + # data type: SendCode9 + oneof_schema_3_validator: Optional[SendCode9] = None + actual_instance: Optional[Union[IsVerified, ReturnCode13, SendCode9]] = None + one_of_schemas: Set[str] = { "IsVerified", "ReturnCode13", "SendCode9" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaOrganizationServiceSetHumanEmail.model_construct() + error_messages = [] + match = 0 + # validate data type: IsVerified + if not isinstance(v, IsVerified): + error_messages.append(f"Error! Input type `{type(v)}` is not `IsVerified`") + else: + match += 1 + # validate data type: ReturnCode13 + if not isinstance(v, ReturnCode13): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode13`") + else: + match += 1 + # validate data type: SendCode9 + if not isinstance(v, SendCode9): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode9`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaOrganizationServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode13, SendCode9. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaOrganizationServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode13, SendCode9. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IsVerified + try: + instance.actual_instance = IsVerified.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ReturnCode13 + try: + instance.actual_instance = ReturnCode13.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode9 + try: + instance.actual_instance = SendCode9.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaOrganizationServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode13, SendCode9. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaOrganizationServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode13, SendCode9. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IsVerified, ReturnCode13, SendCode9]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_organization_service_set_human_phone.py b/zitadel_client/models/beta_organization_service_set_human_phone.py new file mode 100644 index 00000000..adad2c1d --- /dev/null +++ b/zitadel_client/models/beta_organization_service_set_human_phone.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.is_verified import IsVerified +from zitadel_client.models.return_code14 import ReturnCode14 +from zitadel_client.models.send_code10 import SendCode10 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAORGANIZATIONSERVICESETHUMANPHONE_ONE_OF_SCHEMAS = ["IsVerified", "ReturnCode14", "SendCode10"] + +class BetaOrganizationServiceSetHumanPhone(BaseModel): + """ + BetaOrganizationServiceSetHumanPhone + """ + # data type: IsVerified + oneof_schema_1_validator: Optional[IsVerified] = None + # data type: ReturnCode14 + oneof_schema_2_validator: Optional[ReturnCode14] = None + # data type: SendCode10 + oneof_schema_3_validator: Optional[SendCode10] = None + actual_instance: Optional[Union[IsVerified, ReturnCode14, SendCode10]] = None + one_of_schemas: Set[str] = { "IsVerified", "ReturnCode14", "SendCode10" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaOrganizationServiceSetHumanPhone.model_construct() + error_messages = [] + match = 0 + # validate data type: IsVerified + if not isinstance(v, IsVerified): + error_messages.append(f"Error! Input type `{type(v)}` is not `IsVerified`") + else: + match += 1 + # validate data type: ReturnCode14 + if not isinstance(v, ReturnCode14): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode14`") + else: + match += 1 + # validate data type: SendCode10 + if not isinstance(v, SendCode10): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode10`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaOrganizationServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode14, SendCode10. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaOrganizationServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode14, SendCode10. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IsVerified + try: + instance.actual_instance = IsVerified.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ReturnCode14 + try: + instance.actual_instance = ReturnCode14.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode10 + try: + instance.actual_instance = SendCode10.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaOrganizationServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode14, SendCode10. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaOrganizationServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode14, SendCode10. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IsVerified, ReturnCode14, SendCode10]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_organization_service_set_human_profile.py b/zitadel_client/models/beta_organization_service_set_human_profile.py new file mode 100644 index 00000000..2b511229 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_set_human_profile.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_gender import BetaOrganizationServiceGender +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceSetHumanProfile(BaseModel): + """ + BetaOrganizationServiceSetHumanProfile + """ # noqa: E501 + given_name: StrictStr = Field(alias="givenName") + family_name: StrictStr = Field(alias="familyName") + nick_name: Optional[StrictStr] = Field(default=None, alias="nickName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + preferred_language: Optional[StrictStr] = Field(default=None, alias="preferredLanguage") + gender: Optional[BetaOrganizationServiceGender] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetHumanProfile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict['nickName'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if preferred_language (nullable) is None + # and model_fields_set contains the field + if self.preferred_language is None and "preferred_language" in self.model_fields_set: + _dict['preferredLanguage'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetHumanProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "givenName": obj.get("givenName"), + "familyName": obj.get("familyName"), + "nickName": obj.get("nickName"), + "displayName": obj.get("displayName"), + "preferredLanguage": obj.get("preferredLanguage"), + "gender": obj.get("gender") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_set_metadata_entry.py b/zitadel_client/models/beta_organization_service_set_metadata_entry.py new file mode 100644 index 00000000..fed44e6d --- /dev/null +++ b/zitadel_client/models/beta_organization_service_set_metadata_entry.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceSetMetadataEntry(BaseModel): + """ + BetaOrganizationServiceSetMetadataEntry + """ # noqa: E501 + key: StrictStr + value: Union[StrictBytes, StrictStr] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetMetadataEntry from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetMetadataEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "value": obj.get("value") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_any.py b/zitadel_client/models/beta_session_service_any.py new file mode 100644 index 00000000..da60672e --- /dev/null +++ b/zitadel_client/models/beta_session_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_challenges.py b/zitadel_client/models/beta_session_service_challenges.py new file mode 100644 index 00000000..993b669d --- /dev/null +++ b/zitadel_client/models/beta_session_service_challenges.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_web_auth_n import BetaSessionServiceWebAuthN +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceChallenges(BaseModel): + """ + BetaSessionServiceChallenges + """ # noqa: E501 + web_auth_n: Optional[BetaSessionServiceWebAuthN] = Field(default=None, alias="webAuthN") + otp_sms: Optional[StrictStr] = Field(default=None, alias="otpSms") + otp_email: Optional[StrictStr] = Field(default=None, alias="otpEmail") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceChallenges from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of web_auth_n + if self.web_auth_n: + _dict['webAuthN'] = self.web_auth_n.to_dict() + # set to None if otp_sms (nullable) is None + # and model_fields_set contains the field + if self.otp_sms is None and "otp_sms" in self.model_fields_set: + _dict['otpSms'] = None + + # set to None if otp_email (nullable) is None + # and model_fields_set contains the field + if self.otp_email is None and "otp_email" in self.model_fields_set: + _dict['otpEmail'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceChallenges from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "webAuthN": BetaSessionServiceWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, + "otpSms": obj.get("otpSms"), + "otpEmail": obj.get("otpEmail") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_check_idp_intent.py b/zitadel_client/models/beta_session_service_check_idp_intent.py new file mode 100644 index 00000000..eaf4e339 --- /dev/null +++ b/zitadel_client/models/beta_session_service_check_idp_intent.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCheckIDPIntent(BaseModel): + """ + BetaSessionServiceCheckIDPIntent + """ # noqa: E501 + idp_intent_id: Optional[StrictStr] = Field(default=None, alias="idpIntentId") + idp_intent_token: Optional[StrictStr] = Field(default=None, alias="idpIntentToken") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckIDPIntent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckIDPIntent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idpIntentId": obj.get("idpIntentId"), + "idpIntentToken": obj.get("idpIntentToken") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_check_otp.py b/zitadel_client/models/beta_session_service_check_otp.py new file mode 100644 index 00000000..0cc9dda4 --- /dev/null +++ b/zitadel_client/models/beta_session_service_check_otp.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCheckOTP(BaseModel): + """ + BetaSessionServiceCheckOTP + """ # noqa: E501 + code: Optional[StrictStr] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckOTP from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckOTP from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_check_password.py b/zitadel_client/models/beta_session_service_check_password.py new file mode 100644 index 00000000..97123478 --- /dev/null +++ b/zitadel_client/models/beta_session_service_check_password.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCheckPassword(BaseModel): + """ + BetaSessionServiceCheckPassword + """ # noqa: E501 + password: Optional[StrictStr] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckPassword from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckPassword from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": obj.get("password") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_check_totp.py b/zitadel_client/models/beta_session_service_check_totp.py new file mode 100644 index 00000000..e2242b4f --- /dev/null +++ b/zitadel_client/models/beta_session_service_check_totp.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCheckTOTP(BaseModel): + """ + BetaSessionServiceCheckTOTP + """ # noqa: E501 + code: Optional[StrictStr] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckTOTP from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckTOTP from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_check_user.py b/zitadel_client/models/beta_session_service_check_user.py new file mode 100644 index 00000000..1492e8c4 --- /dev/null +++ b/zitadel_client/models/beta_session_service_check_user.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.login_name import LoginName +from zitadel_client.models.user_id import UserId +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETASESSIONSERVICECHECKUSER_ONE_OF_SCHEMAS = ["LoginName", "UserId"] + +class BetaSessionServiceCheckUser(BaseModel): + """ + BetaSessionServiceCheckUser + """ + # data type: LoginName + oneof_schema_1_validator: Optional[LoginName] = None + # data type: UserId + oneof_schema_2_validator: Optional[UserId] = None + actual_instance: Optional[Union[LoginName, UserId]] = None + one_of_schemas: Set[str] = { "LoginName", "UserId" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaSessionServiceCheckUser.model_construct() + error_messages = [] + match = 0 + # validate data type: LoginName + if not isinstance(v, LoginName): + error_messages.append(f"Error! Input type `{type(v)}` is not `LoginName`") + else: + match += 1 + # validate data type: UserId + if not isinstance(v, UserId): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserId`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaSessionServiceCheckUser with oneOf schemas: LoginName, UserId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaSessionServiceCheckUser with oneOf schemas: LoginName, UserId. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into LoginName + try: + instance.actual_instance = LoginName.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserId + try: + instance.actual_instance = UserId.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaSessionServiceCheckUser with oneOf schemas: LoginName, UserId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaSessionServiceCheckUser with oneOf schemas: LoginName, UserId. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], LoginName, UserId]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_session_service_check_web_auth_n.py b/zitadel_client/models/beta_session_service_check_web_auth_n.py new file mode 100644 index 00000000..f5ab9985 --- /dev/null +++ b/zitadel_client/models/beta_session_service_check_web_auth_n.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_value import BetaSessionServiceValue +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCheckWebAuthN(BaseModel): + """ + BetaSessionServiceCheckWebAuthN + """ # noqa: E501 + credential_assertion_data: Dict[str, Optional[BetaSessionServiceValue]] = Field(description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="credentialAssertionData") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckWebAuthN from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each value in credential_assertion_data (dict) + _field_dict = {} + if self.credential_assertion_data: + for _key_credential_assertion_data in self.credential_assertion_data: + if self.credential_assertion_data[_key_credential_assertion_data]: + _field_dict[_key_credential_assertion_data] = self.credential_assertion_data[_key_credential_assertion_data].to_dict() + _dict['credentialAssertionData'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckWebAuthN from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "credentialAssertionData": dict( + (_k, BetaSessionServiceValue.from_dict(_v)) + for _k, _v in obj["credentialAssertionData"].items() + ) + if obj.get("credentialAssertionData") is not None + else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_checks.py b/zitadel_client/models/beta_session_service_checks.py new file mode 100644 index 00000000..008dd96b --- /dev/null +++ b/zitadel_client/models/beta_session_service_checks.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_check_idp_intent import BetaSessionServiceCheckIDPIntent +from zitadel_client.models.beta_session_service_check_otp import BetaSessionServiceCheckOTP +from zitadel_client.models.beta_session_service_check_password import BetaSessionServiceCheckPassword +from zitadel_client.models.beta_session_service_check_totp import BetaSessionServiceCheckTOTP +from zitadel_client.models.beta_session_service_check_user import BetaSessionServiceCheckUser +from zitadel_client.models.beta_session_service_check_web_auth_n import BetaSessionServiceCheckWebAuthN +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceChecks(BaseModel): + """ + BetaSessionServiceChecks + """ # noqa: E501 + user: Optional[BetaSessionServiceCheckUser] = None + password: Optional[BetaSessionServiceCheckPassword] = None + web_auth_n: Optional[BetaSessionServiceCheckWebAuthN] = Field(default=None, alias="webAuthN") + idp_intent: Optional[BetaSessionServiceCheckIDPIntent] = Field(default=None, alias="idpIntent") + totp: Optional[BetaSessionServiceCheckTOTP] = None + otp_sms: Optional[BetaSessionServiceCheckOTP] = Field(default=None, alias="otpSms") + otp_email: Optional[BetaSessionServiceCheckOTP] = Field(default=None, alias="otpEmail") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceChecks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + # 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() + # override the default output from pydantic by calling `to_dict()` of idp_intent + if self.idp_intent: + _dict['idpIntent'] = self.idp_intent.to_dict() + # override the default output from pydantic by calling `to_dict()` of totp + if self.totp: + _dict['totp'] = self.totp.to_dict() + # override the default output from pydantic by calling `to_dict()` of otp_sms + if self.otp_sms: + _dict['otpSms'] = self.otp_sms.to_dict() + # override the default output from pydantic by calling `to_dict()` of otp_email + if self.otp_email: + _dict['otpEmail'] = self.otp_email.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceChecks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user": BetaSessionServiceCheckUser.from_dict(obj["user"]) if obj.get("user") is not None else None, + "password": BetaSessionServiceCheckPassword.from_dict(obj["password"]) if obj.get("password") is not None else None, + "webAuthN": BetaSessionServiceCheckWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, + "idpIntent": BetaSessionServiceCheckIDPIntent.from_dict(obj["idpIntent"]) if obj.get("idpIntent") is not None else None, + "totp": BetaSessionServiceCheckTOTP.from_dict(obj["totp"]) if obj.get("totp") is not None else None, + "otpSms": BetaSessionServiceCheckOTP.from_dict(obj["otpSms"]) if obj.get("otpSms") is not None else None, + "otpEmail": BetaSessionServiceCheckOTP.from_dict(obj["otpEmail"]) if obj.get("otpEmail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_connect_error.py b/zitadel_client/models/beta_session_service_connect_error.py new file mode 100644 index 00000000..4438d91e --- /dev/null +++ b/zitadel_client/models/beta_session_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_session_service_any import BetaSessionServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaSessionServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaSessionServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_create_session_request.py b/zitadel_client/models/beta_session_service_create_session_request.py new file mode 100644 index 00000000..d0656de2 --- /dev/null +++ b/zitadel_client/models/beta_session_service_create_session_request.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from zitadel_client.models.beta_session_service_checks import BetaSessionServiceChecks +from zitadel_client.models.beta_session_service_request_challenges import BetaSessionServiceRequestChallenges +from zitadel_client.models.beta_session_service_user_agent import BetaSessionServiceUserAgent +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCreateSessionRequest(BaseModel): + """ + BetaSessionServiceCreateSessionRequest + """ # noqa: E501 + checks: Optional[BetaSessionServiceChecks] = None + metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = None + challenges: Optional[BetaSessionServiceRequestChallenges] = None + user_agent: Optional[BetaSessionServiceUserAgent] = Field(default=None, alias="userAgent") + lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCreateSessionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of checks + if self.checks: + _dict['checks'] = self.checks.to_dict() + # override the default output from pydantic by calling `to_dict()` of challenges + if self.challenges: + _dict['challenges'] = self.challenges.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_agent + if self.user_agent: + _dict['userAgent'] = self.user_agent.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCreateSessionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "checks": BetaSessionServiceChecks.from_dict(obj["checks"]) if obj.get("checks") is not None else None, + "metadata": obj.get("metadata"), + "challenges": BetaSessionServiceRequestChallenges.from_dict(obj["challenges"]) if obj.get("challenges") is not None else None, + "userAgent": BetaSessionServiceUserAgent.from_dict(obj["userAgent"]) if obj.get("userAgent") is not None else None, + "lifetime": obj.get("lifetime") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_create_session_response.py b/zitadel_client/models/beta_session_service_create_session_response.py new file mode 100644 index 00000000..7a0d9ab0 --- /dev/null +++ b/zitadel_client/models/beta_session_service_create_session_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_challenges import BetaSessionServiceChallenges +from zitadel_client.models.beta_session_service_details import BetaSessionServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCreateSessionResponse(BaseModel): + """ + BetaSessionServiceCreateSessionResponse + """ # noqa: E501 + details: Optional[BetaSessionServiceDetails] = None + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + challenges: Optional[BetaSessionServiceChallenges] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCreateSessionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of challenges + if self.challenges: + _dict['challenges'] = self.challenges.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCreateSessionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSessionServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "sessionId": obj.get("sessionId"), + "sessionToken": obj.get("sessionToken"), + "challenges": BetaSessionServiceChallenges.from_dict(obj["challenges"]) if obj.get("challenges") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_creation_date_query.py b/zitadel_client/models/beta_session_service_creation_date_query.py new file mode 100644 index 00000000..13e98df6 --- /dev/null +++ b/zitadel_client/models/beta_session_service_creation_date_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_timestamp_query_method import BetaSessionServiceTimestampQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCreationDateQuery(BaseModel): + """ + BetaSessionServiceCreationDateQuery + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + method: Optional[BetaSessionServiceTimestampQueryMethod] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCreationDateQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCreationDateQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_delete_session_request.py b/zitadel_client/models/beta_session_service_delete_session_request.py new file mode 100644 index 00000000..f5ee2e76 --- /dev/null +++ b/zitadel_client/models/beta_session_service_delete_session_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceDeleteSessionRequest(BaseModel): + """ + BetaSessionServiceDeleteSessionRequest + """ # noqa: E501 + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceDeleteSessionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if session_token (nullable) is None + # and model_fields_set contains the field + if self.session_token is None and "session_token" in self.model_fields_set: + _dict['sessionToken'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceDeleteSessionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sessionId": obj.get("sessionId"), + "sessionToken": obj.get("sessionToken") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_delete_session_response.py b/zitadel_client/models/beta_session_service_delete_session_response.py new file mode 100644 index 00000000..6af5fd22 --- /dev/null +++ b/zitadel_client/models/beta_session_service_delete_session_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_details import BetaSessionServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceDeleteSessionResponse(BaseModel): + """ + BetaSessionServiceDeleteSessionResponse + """ # noqa: E501 + details: Optional[BetaSessionServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceDeleteSessionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceDeleteSessionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSessionServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_details.py b/zitadel_client/models/beta_session_service_details.py new file mode 100644 index 00000000..f4c33a4d --- /dev/null +++ b/zitadel_client/models/beta_session_service_details.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceDetails(BaseModel): + """ + BetaSessionServiceDetails + """ # noqa: E501 + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sequence": obj.get("sequence"), + "changeDate": obj.get("changeDate"), + "resourceOwner": obj.get("resourceOwner"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_factors.py b/zitadel_client/models/beta_session_service_factors.py new file mode 100644 index 00000000..6684ea53 --- /dev/null +++ b/zitadel_client/models/beta_session_service_factors.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_intent_factor import BetaSessionServiceIntentFactor +from zitadel_client.models.beta_session_service_otp_factor import BetaSessionServiceOTPFactor +from zitadel_client.models.beta_session_service_password_factor import BetaSessionServicePasswordFactor +from zitadel_client.models.beta_session_service_totp_factor import BetaSessionServiceTOTPFactor +from zitadel_client.models.beta_session_service_user_factor import BetaSessionServiceUserFactor +from zitadel_client.models.beta_session_service_web_auth_n_factor import BetaSessionServiceWebAuthNFactor +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceFactors(BaseModel): + """ + BetaSessionServiceFactors + """ # noqa: E501 + user: Optional[BetaSessionServiceUserFactor] = None + password: Optional[BetaSessionServicePasswordFactor] = None + web_auth_n: Optional[BetaSessionServiceWebAuthNFactor] = Field(default=None, alias="webAuthN") + intent: Optional[BetaSessionServiceIntentFactor] = None + totp: Optional[BetaSessionServiceTOTPFactor] = None + otp_sms: Optional[BetaSessionServiceOTPFactor] = Field(default=None, alias="otpSms") + otp_email: Optional[BetaSessionServiceOTPFactor] = Field(default=None, alias="otpEmail") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceFactors from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + # 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() + # override the default output from pydantic by calling `to_dict()` of intent + if self.intent: + _dict['intent'] = self.intent.to_dict() + # override the default output from pydantic by calling `to_dict()` of totp + if self.totp: + _dict['totp'] = self.totp.to_dict() + # override the default output from pydantic by calling `to_dict()` of otp_sms + if self.otp_sms: + _dict['otpSms'] = self.otp_sms.to_dict() + # override the default output from pydantic by calling `to_dict()` of otp_email + if self.otp_email: + _dict['otpEmail'] = self.otp_email.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceFactors from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user": BetaSessionServiceUserFactor.from_dict(obj["user"]) if obj.get("user") is not None else None, + "password": BetaSessionServicePasswordFactor.from_dict(obj["password"]) if obj.get("password") is not None else None, + "webAuthN": BetaSessionServiceWebAuthNFactor.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, + "intent": BetaSessionServiceIntentFactor.from_dict(obj["intent"]) if obj.get("intent") is not None else None, + "totp": BetaSessionServiceTOTPFactor.from_dict(obj["totp"]) if obj.get("totp") is not None else None, + "otpSms": BetaSessionServiceOTPFactor.from_dict(obj["otpSms"]) if obj.get("otpSms") is not None else None, + "otpEmail": BetaSessionServiceOTPFactor.from_dict(obj["otpEmail"]) if obj.get("otpEmail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_get_session_request.py b/zitadel_client/models/beta_session_service_get_session_request.py new file mode 100644 index 00000000..cbb33e77 --- /dev/null +++ b/zitadel_client/models/beta_session_service_get_session_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceGetSessionRequest(BaseModel): + """ + BetaSessionServiceGetSessionRequest + """ # noqa: E501 + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceGetSessionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if session_token (nullable) is None + # and model_fields_set contains the field + if self.session_token is None and "session_token" in self.model_fields_set: + _dict['sessionToken'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceGetSessionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sessionId": obj.get("sessionId"), + "sessionToken": obj.get("sessionToken") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_get_session_response.py b/zitadel_client/models/beta_session_service_get_session_response.py new file mode 100644 index 00000000..fe9ac3b6 --- /dev/null +++ b/zitadel_client/models/beta_session_service_get_session_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_session import BetaSessionServiceSession +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceGetSessionResponse(BaseModel): + """ + BetaSessionServiceGetSessionResponse + """ # noqa: E501 + session: Optional[BetaSessionServiceSession] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceGetSessionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of session + if self.session: + _dict['session'] = self.session.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceGetSessionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "session": BetaSessionServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/session_service_user_agent_header_values.py b/zitadel_client/models/beta_session_service_header_values.py similarity index 86% rename from zitadel_client/models/session_service_user_agent_header_values.py rename to zitadel_client/models/beta_session_service_header_values.py index cf1b1660..c24ed0be 100644 --- a/zitadel_client/models/session_service_user_agent_header_values.py +++ b/zitadel_client/models/beta_session_service_header_values.py @@ -22,9 +22,9 @@ from typing import Optional, Set from typing_extensions import Self -class SessionServiceUserAgentHeaderValues(BaseModel): +class BetaSessionServiceHeaderValues(BaseModel): """ - A header may have multiple values. In Go, headers are defined as map[string][]string, but protobuf doesn't allow this scheme. + 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 @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceUserAgentHeaderValues from a JSON string""" + """Create an instance of BetaSessionServiceHeaderValues from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceUserAgentHeaderValues from a dict""" + """Create an instance of BetaSessionServiceHeaderValues from a dict""" if obj is None: return None diff --git a/zitadel_client/models/beta_session_service_ids_query.py b/zitadel_client/models/beta_session_service_ids_query.py new file mode 100644 index 00000000..bae74152 --- /dev/null +++ b/zitadel_client/models/beta_session_service_ids_query.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceIDsQuery(BaseModel): + """ + BetaSessionServiceIDsQuery + """ # noqa: E501 + ids: Optional[List[StrictStr]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceIDsQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceIDsQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ids": obj.get("ids") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_intent_factor.py b/zitadel_client/models/beta_session_service_intent_factor.py new file mode 100644 index 00000000..16ec590c --- /dev/null +++ b/zitadel_client/models/beta_session_service_intent_factor.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceIntentFactor(BaseModel): + """ + BetaSessionServiceIntentFactor + """ # noqa: E501 + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceIntentFactor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceIntentFactor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verifiedAt": obj.get("verifiedAt") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_list_details.py b/zitadel_client/models/beta_session_service_list_details.py new file mode 100644 index 00000000..b92a3e10 --- /dev/null +++ b/zitadel_client/models/beta_session_service_list_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceListDetails(BaseModel): + """ + BetaSessionServiceListDetails + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceListDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceListDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "processedSequence": obj.get("processedSequence"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_list_query.py b/zitadel_client/models/beta_session_service_list_query.py new file mode 100644 index 00000000..75c512e2 --- /dev/null +++ b/zitadel_client/models/beta_session_service_list_query.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceListQuery(BaseModel): + """ + BetaSessionServiceListQuery + """ # noqa: E501 + offset: Optional[Any] = None + limit: Optional[StrictInt] = None + asc: Optional[StrictBool] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceListQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceListQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "offset": obj.get("offset"), + "limit": obj.get("limit"), + "asc": obj.get("asc") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_list_sessions_request.py b/zitadel_client/models/beta_session_service_list_sessions_request.py new file mode 100644 index 00000000..88a84839 --- /dev/null +++ b/zitadel_client/models/beta_session_service_list_sessions_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_session_service_list_query import BetaSessionServiceListQuery +from zitadel_client.models.beta_session_service_search_query import BetaSessionServiceSearchQuery +from zitadel_client.models.beta_session_service_session_field_name import BetaSessionServiceSessionFieldName +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceListSessionsRequest(BaseModel): + """ + BetaSessionServiceListSessionsRequest + """ # noqa: E501 + query: Optional[BetaSessionServiceListQuery] = None + queries: Optional[List[BetaSessionServiceSearchQuery]] = None + sorting_column: Optional[BetaSessionServiceSessionFieldName] = Field(default=None, alias="sortingColumn") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceListSessionsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of query + if self.query: + _dict['query'] = self.query.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in queries (list) + _items = [] + if self.queries: + for _item_queries in self.queries: + if _item_queries: + _items.append(_item_queries.to_dict()) + _dict['queries'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceListSessionsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "query": BetaSessionServiceListQuery.from_dict(obj["query"]) if obj.get("query") is not None else None, + "queries": [BetaSessionServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None, + "sortingColumn": obj.get("sortingColumn") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_list_sessions_response.py b/zitadel_client/models/beta_session_service_list_sessions_response.py new file mode 100644 index 00000000..a44fe199 --- /dev/null +++ b/zitadel_client/models/beta_session_service_list_sessions_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_session_service_list_details import BetaSessionServiceListDetails +from zitadel_client.models.beta_session_service_session import BetaSessionServiceSession +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceListSessionsResponse(BaseModel): + """ + BetaSessionServiceListSessionsResponse + """ # noqa: E501 + details: Optional[BetaSessionServiceListDetails] = None + sessions: Optional[List[BetaSessionServiceSession]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceListSessionsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in sessions (list) + _items = [] + if self.sessions: + for _item_sessions in self.sessions: + if _item_sessions: + _items.append(_item_sessions.to_dict()) + _dict['sessions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceListSessionsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSessionServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "sessions": [BetaSessionServiceSession.from_dict(_item) for _item in obj["sessions"]] if obj.get("sessions") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_otp_email.py b/zitadel_client/models/beta_session_service_otp_email.py new file mode 100644 index 00000000..73350b7d --- /dev/null +++ b/zitadel_client/models/beta_session_service_otp_email.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.return_code import ReturnCode +from zitadel_client.models.send_code import SendCode +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETASESSIONSERVICEOTPEMAIL_ONE_OF_SCHEMAS = ["ReturnCode", "SendCode"] + +class BetaSessionServiceOTPEmail(BaseModel): + """ + BetaSessionServiceOTPEmail + """ + # data type: ReturnCode + oneof_schema_1_validator: Optional[ReturnCode] = None + # data type: SendCode + oneof_schema_2_validator: Optional[SendCode] = None + actual_instance: Optional[Union[ReturnCode, SendCode]] = None + one_of_schemas: Set[str] = { "ReturnCode", "SendCode" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaSessionServiceOTPEmail.model_construct() + error_messages = [] + match = 0 + # validate data type: ReturnCode + if not isinstance(v, ReturnCode): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode`") + else: + match += 1 + # validate data type: SendCode + if not isinstance(v, SendCode): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaSessionServiceOTPEmail with oneOf schemas: ReturnCode, SendCode. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaSessionServiceOTPEmail with oneOf schemas: ReturnCode, SendCode. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ReturnCode + try: + instance.actual_instance = ReturnCode.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode + try: + instance.actual_instance = SendCode.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaSessionServiceOTPEmail with oneOf schemas: ReturnCode, SendCode. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaSessionServiceOTPEmail with oneOf schemas: ReturnCode, SendCode. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ReturnCode, SendCode]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_session_service_otp_factor.py b/zitadel_client/models/beta_session_service_otp_factor.py new file mode 100644 index 00000000..38884397 --- /dev/null +++ b/zitadel_client/models/beta_session_service_otp_factor.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceOTPFactor(BaseModel): + """ + BetaSessionServiceOTPFactor + """ # noqa: E501 + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceOTPFactor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceOTPFactor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verifiedAt": obj.get("verifiedAt") + }) + return _obj + + diff --git a/zitadel_client/models/session_service_request_challenges_otpsms.py b/zitadel_client/models/beta_session_service_otpsms.py similarity index 87% rename from zitadel_client/models/session_service_request_challenges_otpsms.py rename to zitadel_client/models/beta_session_service_otpsms.py index 1d969cd5..9025aec5 100644 --- a/zitadel_client/models/session_service_request_challenges_otpsms.py +++ b/zitadel_client/models/beta_session_service_otpsms.py @@ -18,13 +18,13 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class SessionServiceRequestChallengesOTPSMS(BaseModel): +class BetaSessionServiceOTPSMS(BaseModel): """ - SessionServiceRequestChallengesOTPSMS + BetaSessionServiceOTPSMS """ # noqa: E501 return_code: Optional[StrictBool] = Field(default=None, alias="returnCode") @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceRequestChallengesOTPSMS from a JSON string""" + """Create an instance of BetaSessionServiceOTPSMS from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceRequestChallengesOTPSMS from a dict""" + """Create an instance of BetaSessionServiceOTPSMS from a dict""" if obj is None: return None diff --git a/zitadel_client/models/beta_session_service_password_factor.py b/zitadel_client/models/beta_session_service_password_factor.py new file mode 100644 index 00000000..07fccdc2 --- /dev/null +++ b/zitadel_client/models/beta_session_service_password_factor.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServicePasswordFactor(BaseModel): + """ + BetaSessionServicePasswordFactor + """ # noqa: E501 + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServicePasswordFactor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServicePasswordFactor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verifiedAt": obj.get("verifiedAt") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_request_challenges.py b/zitadel_client/models/beta_session_service_request_challenges.py new file mode 100644 index 00000000..285b408f --- /dev/null +++ b/zitadel_client/models/beta_session_service_request_challenges.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_otp_email import BetaSessionServiceOTPEmail +from zitadel_client.models.beta_session_service_otpsms import BetaSessionServiceOTPSMS +from zitadel_client.models.beta_session_service_web_auth_n import BetaSessionServiceWebAuthN +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceRequestChallenges(BaseModel): + """ + BetaSessionServiceRequestChallenges + """ # noqa: E501 + web_auth_n: Optional[BetaSessionServiceWebAuthN] = Field(default=None, alias="webAuthN") + otp_sms: Optional[BetaSessionServiceOTPSMS] = Field(default=None, alias="otpSms") + otp_email: Optional[BetaSessionServiceOTPEmail] = Field(default=None, alias="otpEmail") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceRequestChallenges from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of web_auth_n + if self.web_auth_n: + _dict['webAuthN'] = self.web_auth_n.to_dict() + # override the default output from pydantic by calling `to_dict()` of otp_sms + if self.otp_sms: + _dict['otpSms'] = self.otp_sms.to_dict() + # override the default output from pydantic by calling `to_dict()` of otp_email + if self.otp_email: + _dict['otpEmail'] = self.otp_email.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceRequestChallenges from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "webAuthN": BetaSessionServiceWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, + "otpSms": BetaSessionServiceOTPSMS.from_dict(obj["otpSms"]) if obj.get("otpSms") is not None else None, + "otpEmail": BetaSessionServiceOTPEmail.from_dict(obj["otpEmail"]) if obj.get("otpEmail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_search_query.py b/zitadel_client/models/beta_session_service_search_query.py new file mode 100644 index 00000000..13bac930 --- /dev/null +++ b/zitadel_client/models/beta_session_service_search_query.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.creation_date_query import CreationDateQuery +from zitadel_client.models.ids_query import IdsQuery +from zitadel_client.models.user_id_query import UserIdQuery +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETASESSIONSERVICESEARCHQUERY_ONE_OF_SCHEMAS = ["CreationDateQuery", "IdsQuery", "UserIdQuery"] + +class BetaSessionServiceSearchQuery(BaseModel): + """ + BetaSessionServiceSearchQuery + """ + # data type: CreationDateQuery + oneof_schema_1_validator: Optional[CreationDateQuery] = None + # data type: IdsQuery + oneof_schema_2_validator: Optional[IdsQuery] = None + # data type: UserIdQuery + oneof_schema_3_validator: Optional[UserIdQuery] = None + actual_instance: Optional[Union[CreationDateQuery, IdsQuery, UserIdQuery]] = None + one_of_schemas: Set[str] = { "CreationDateQuery", "IdsQuery", "UserIdQuery" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaSessionServiceSearchQuery.model_construct() + error_messages = [] + match = 0 + # validate data type: CreationDateQuery + if not isinstance(v, CreationDateQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreationDateQuery`") + else: + match += 1 + # validate data type: IdsQuery + if not isinstance(v, IdsQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `IdsQuery`") + else: + match += 1 + # validate data type: UserIdQuery + if not isinstance(v, UserIdQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserIdQuery`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaSessionServiceSearchQuery with oneOf schemas: CreationDateQuery, IdsQuery, UserIdQuery. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaSessionServiceSearchQuery with oneOf schemas: CreationDateQuery, IdsQuery, UserIdQuery. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into CreationDateQuery + try: + instance.actual_instance = CreationDateQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into IdsQuery + try: + instance.actual_instance = IdsQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserIdQuery + try: + instance.actual_instance = UserIdQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaSessionServiceSearchQuery with oneOf schemas: CreationDateQuery, IdsQuery, UserIdQuery. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaSessionServiceSearchQuery with oneOf schemas: CreationDateQuery, IdsQuery, UserIdQuery. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CreationDateQuery, IdsQuery, UserIdQuery]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_session_service_send_code.py b/zitadel_client/models/beta_session_service_send_code.py new file mode 100644 index 00000000..d2bdea25 --- /dev/null +++ b/zitadel_client/models/beta_session_service_send_code.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceSendCode(BaseModel): + """ + BetaSessionServiceSendCode + """ # noqa: E501 + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceSendCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceSendCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_session.py b/zitadel_client/models/beta_session_service_session.py new file mode 100644 index 00000000..f9264d45 --- /dev/null +++ b/zitadel_client/models/beta_session_service_session.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from zitadel_client.models.beta_session_service_factors import BetaSessionServiceFactors +from zitadel_client.models.beta_session_service_user_agent import BetaSessionServiceUserAgent +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceSession(BaseModel): + """ + BetaSessionServiceSession + """ # noqa: E501 + id: Optional[StrictStr] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + sequence: Optional[Any] = None + factors: Optional[BetaSessionServiceFactors] = None + metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = None + user_agent: Optional[BetaSessionServiceUserAgent] = Field(default=None, alias="userAgent") + expiration_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="expirationDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceSession from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of factors + if self.factors: + _dict['factors'] = self.factors.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_agent + if self.user_agent: + _dict['userAgent'] = self.user_agent.to_dict() + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceSession from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "sequence": obj.get("sequence"), + "factors": BetaSessionServiceFactors.from_dict(obj["factors"]) if obj.get("factors") is not None else None, + "metadata": obj.get("metadata"), + "userAgent": BetaSessionServiceUserAgent.from_dict(obj["userAgent"]) if obj.get("userAgent") is not None else None, + "expirationDate": obj.get("expirationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_session_field_name.py b/zitadel_client/models/beta_session_service_session_field_name.py new file mode 100644 index 00000000..b505a861 --- /dev/null +++ b/zitadel_client/models/beta_session_service_session_field_name.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSessionServiceSessionFieldName(str, Enum): + """ + BetaSessionServiceSessionFieldName + """ + + """ + allowed enum values + """ + SESSION_FIELD_NAME_UNSPECIFIED = 'SESSION_FIELD_NAME_UNSPECIFIED' + SESSION_FIELD_NAME_CREATION_DATE = 'SESSION_FIELD_NAME_CREATION_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSessionServiceSessionFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_session_service_set_session_request.py b/zitadel_client/models/beta_session_service_set_session_request.py new file mode 100644 index 00000000..8c11bdd4 --- /dev/null +++ b/zitadel_client/models/beta_session_service_set_session_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from zitadel_client.models.beta_session_service_checks import BetaSessionServiceChecks +from zitadel_client.models.beta_session_service_request_challenges import BetaSessionServiceRequestChallenges +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceSetSessionRequest(BaseModel): + """ + BetaSessionServiceSetSessionRequest + """ # noqa: E501 + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + checks: Optional[BetaSessionServiceChecks] = None + metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = None + challenges: Optional[BetaSessionServiceRequestChallenges] = None + lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceSetSessionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of checks + if self.checks: + _dict['checks'] = self.checks.to_dict() + # override the default output from pydantic by calling `to_dict()` of challenges + if self.challenges: + _dict['challenges'] = self.challenges.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceSetSessionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sessionId": obj.get("sessionId"), + "sessionToken": obj.get("sessionToken"), + "checks": BetaSessionServiceChecks.from_dict(obj["checks"]) if obj.get("checks") is not None else None, + "metadata": obj.get("metadata"), + "challenges": BetaSessionServiceRequestChallenges.from_dict(obj["challenges"]) if obj.get("challenges") is not None else None, + "lifetime": obj.get("lifetime") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_execution.py b/zitadel_client/models/beta_session_service_set_session_response.py similarity index 64% rename from zitadel_client/models/action_service_beta_execution.py rename to zitadel_client/models/beta_session_service_set_session_response.py index dd544268..8d464170 100644 --- a/zitadel_client/models/action_service_beta_execution.py +++ b/zitadel_client/models/beta_session_service_set_session_response.py @@ -17,21 +17,20 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_condition import ActionServiceBetaCondition +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_challenges import BetaSessionServiceChallenges +from zitadel_client.models.beta_session_service_details import BetaSessionServiceDetails from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaExecution(BaseModel): +class BetaSessionServiceSetSessionResponse(BaseModel): """ - ActionServiceBetaExecution + BetaSessionServiceSetSessionResponse """ # noqa: E501 - condition: Optional[ActionServiceBetaCondition] = None - creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the execution creation.", alias="creationDate") - change_date: Optional[datetime] = Field(default=None, description="The timestamp of the last change to the execution.", alias="changeDate") - targets: Optional[List[StrictStr]] = Field(default=None, description="Ordered list of targets called during the execution.") + details: Optional[BetaSessionServiceDetails] = None + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + challenges: Optional[BetaSessionServiceChallenges] = None model_config = ConfigDict( populate_by_name=True, @@ -51,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaExecution from a JSON string""" + """Create an instance of BetaSessionServiceSetSessionResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,14 +71,17 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of condition - if self.condition: - _dict['condition'] = self.condition.to_dict() + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of challenges + if self.challenges: + _dict['challenges'] = self.challenges.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaExecution from a dict""" + """Create an instance of BetaSessionServiceSetSessionResponse from a dict""" if obj is None: return None @@ -87,10 +89,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "condition": ActionServiceBetaCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, - "creationDate": obj.get("creationDate"), - "changeDate": obj.get("changeDate"), - "targets": obj.get("targets") + "details": BetaSessionServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "sessionToken": obj.get("sessionToken"), + "challenges": BetaSessionServiceChallenges.from_dict(obj["challenges"]) if obj.get("challenges") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_session_service_timestamp_query_method.py b/zitadel_client/models/beta_session_service_timestamp_query_method.py new file mode 100644 index 00000000..ec32c4d4 --- /dev/null +++ b/zitadel_client/models/beta_session_service_timestamp_query_method.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSessionServiceTimestampQueryMethod(str, Enum): + """ + BetaSessionServiceTimestampQueryMethod + """ + + """ + allowed enum values + """ + TIMESTAMP_QUERY_METHOD_EQUALS = 'TIMESTAMP_QUERY_METHOD_EQUALS' + TIMESTAMP_QUERY_METHOD_GREATER = 'TIMESTAMP_QUERY_METHOD_GREATER' + TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS = 'TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS' + TIMESTAMP_QUERY_METHOD_LESS = 'TIMESTAMP_QUERY_METHOD_LESS' + TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS = 'TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSessionServiceTimestampQueryMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_session_service_totp_factor.py b/zitadel_client/models/beta_session_service_totp_factor.py new file mode 100644 index 00000000..d7eab0a9 --- /dev/null +++ b/zitadel_client/models/beta_session_service_totp_factor.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceTOTPFactor(BaseModel): + """ + BetaSessionServiceTOTPFactor + """ # noqa: E501 + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceTOTPFactor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceTOTPFactor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verifiedAt": obj.get("verifiedAt") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_user_agent.py b/zitadel_client/models/beta_session_service_user_agent.py new file mode 100644 index 00000000..2958c5b6 --- /dev/null +++ b/zitadel_client/models/beta_session_service_user_agent.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_header_values import BetaSessionServiceHeaderValues +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceUserAgent(BaseModel): + """ + BetaSessionServiceUserAgent + """ # noqa: E501 + fingerprint_id: Optional[StrictStr] = Field(default=None, alias="fingerprintId") + ip: Optional[StrictStr] = None + description: Optional[StrictStr] = None + header: Optional[Dict[str, BetaSessionServiceHeaderValues]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceUserAgent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each value in header (dict) + _field_dict = {} + if self.header: + for _key_header in self.header: + if self.header[_key_header]: + _field_dict[_key_header] = self.header[_key_header].to_dict() + _dict['header'] = _field_dict + # set to None if fingerprint_id (nullable) is None + # and model_fields_set contains the field + if self.fingerprint_id is None and "fingerprint_id" in self.model_fields_set: + _dict['fingerprintId'] = None + + # set to None if ip (nullable) is None + # and model_fields_set contains the field + if self.ip is None and "ip" in self.model_fields_set: + _dict['ip'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceUserAgent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fingerprintId": obj.get("fingerprintId"), + "ip": obj.get("ip"), + "description": obj.get("description"), + "header": dict( + (_k, BetaSessionServiceHeaderValues.from_dict(_v)) + for _k, _v in obj["header"].items() + ) + if obj.get("header") is not None + else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_user_factor.py b/zitadel_client/models/beta_session_service_user_factor.py new file mode 100644 index 00000000..b4e9e437 --- /dev/null +++ b/zitadel_client/models/beta_session_service_user_factor.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceUserFactor(BaseModel): + """ + BetaSessionServiceUserFactor + """ # noqa: E501 + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + id: Optional[StrictStr] = None + login_name: Optional[StrictStr] = Field(default=None, alias="loginName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceUserFactor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceUserFactor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verifiedAt": obj.get("verifiedAt"), + "id": obj.get("id"), + "loginName": obj.get("loginName"), + "displayName": obj.get("displayName"), + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_user_id_query.py b/zitadel_client/models/beta_session_service_user_id_query.py new file mode 100644 index 00000000..fc43c563 --- /dev/null +++ b/zitadel_client/models/beta_session_service_user_id_query.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceUserIDQuery(BaseModel): + """ + BetaSessionServiceUserIDQuery + """ # noqa: E501 + id: Optional[StrictStr] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceUserIDQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceUserIDQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_user_verification_requirement.py b/zitadel_client/models/beta_session_service_user_verification_requirement.py new file mode 100644 index 00000000..85911e47 --- /dev/null +++ b/zitadel_client/models/beta_session_service_user_verification_requirement.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSessionServiceUserVerificationRequirement(str, Enum): + """ + BetaSessionServiceUserVerificationRequirement + """ + + """ + allowed enum values + """ + USER_VERIFICATION_REQUIREMENT_UNSPECIFIED = 'USER_VERIFICATION_REQUIREMENT_UNSPECIFIED' + USER_VERIFICATION_REQUIREMENT_REQUIRED = 'USER_VERIFICATION_REQUIREMENT_REQUIRED' + USER_VERIFICATION_REQUIREMENT_PREFERRED = 'USER_VERIFICATION_REQUIREMENT_PREFERRED' + USER_VERIFICATION_REQUIREMENT_DISCOURAGED = 'USER_VERIFICATION_REQUIREMENT_DISCOURAGED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSessionServiceUserVerificationRequirement from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_session_service_value.py b/zitadel_client/models/beta_session_service_value.py new file mode 100644 index 00000000..c09553ca --- /dev/null +++ b/zitadel_client/models/beta_session_service_value.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator +from typing import Any, Dict, List, Optional, Union +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETASESSIONSERVICEVALUE_ONE_OF_SCHEMAS = ["Dict[str, object]", "List[str]", "bool", "float", "str"] + +class BetaSessionServiceValue(BaseModel): + """ + `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value. + """ + # data type: float + oneof_schema_1_validator: Optional[Union[StrictFloat, StrictInt]] = None + # data type: str + oneof_schema_2_validator: Optional[StrictStr] = None + # data type: bool + oneof_schema_3_validator: Optional[StrictBool] = None + # data type: List[str] + oneof_schema_4_validator: Optional[List[StrictStr]] = None + # data type: Dict[str, object] + oneof_schema_5_validator: Optional[Dict[str, Any]] = None + actual_instance: Optional[Union[Dict[str, object], List[str], bool, float, str]] = None + one_of_schemas: Set[str] = { "Dict[str, object]", "List[str]", "bool", "float", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = BetaSessionServiceValue.model_construct() + error_messages = [] + match = 0 + # validate data type: float + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: str + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: bool + try: + instance.oneof_schema_3_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: List[str] + try: + instance.oneof_schema_4_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: Dict[str, object] + try: + instance.oneof_schema_5_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaSessionServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaSessionServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into float + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into str + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into bool + try: + # validation + instance.oneof_schema_3_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_3_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[str] + try: + # validation + instance.oneof_schema_4_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_4_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Dict[str, object] + try: + # validation + instance.oneof_schema_5_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_5_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaSessionServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaSessionServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Dict[str, object], List[str], bool, float, str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_session_service_web_auth_n.py b/zitadel_client/models/beta_session_service_web_auth_n.py new file mode 100644 index 00000000..093de60c --- /dev/null +++ b/zitadel_client/models/beta_session_service_web_auth_n.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from zitadel_client.models.beta_session_service_user_verification_requirement import BetaSessionServiceUserVerificationRequirement +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceWebAuthN(BaseModel): + """ + BetaSessionServiceWebAuthN + """ # noqa: E501 + domain: StrictStr + user_verification_requirement: BetaSessionServiceUserVerificationRequirement = Field(alias="userVerificationRequirement") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceWebAuthN from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceWebAuthN from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "userVerificationRequirement": obj.get("userVerificationRequirement") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_web_auth_n_factor.py b/zitadel_client/models/beta_session_service_web_auth_n_factor.py new file mode 100644 index 00000000..26af1788 --- /dev/null +++ b/zitadel_client/models/beta_session_service_web_auth_n_factor.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceWebAuthNFactor(BaseModel): + """ + BetaSessionServiceWebAuthNFactor + """ # noqa: E501 + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + user_verified: Optional[StrictBool] = Field(default=None, alias="userVerified") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceWebAuthNFactor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceWebAuthNFactor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verifiedAt": obj.get("verifiedAt"), + "userVerified": obj.get("userVerified") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_any.py b/zitadel_client/models/beta_settings_service_any.py new file mode 100644 index 00000000..59b48085 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_branding_settings.py b/zitadel_client/models/beta_settings_service_branding_settings.py new file mode 100644 index 00000000..b2715bad --- /dev/null +++ b/zitadel_client/models/beta_settings_service_branding_settings.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType +from zitadel_client.models.beta_settings_service_theme import BetaSettingsServiceTheme +from zitadel_client.models.beta_settings_service_theme_mode import BetaSettingsServiceThemeMode +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceBrandingSettings(BaseModel): + """ + BetaSettingsServiceBrandingSettings + """ # noqa: E501 + light_theme: Optional[BetaSettingsServiceTheme] = Field(default=None, alias="lightTheme") + dark_theme: Optional[BetaSettingsServiceTheme] = Field(default=None, alias="darkTheme") + font_url: Optional[StrictStr] = Field(default=None, alias="fontUrl") + hide_login_name_suffix: Optional[StrictBool] = Field(default=None, description="hides the org suffix on the login form if the scope \\\"urn:zitadel:iam:org:domain:primary:{domainname}\\\" is set", alias="hideLoginNameSuffix") + disable_watermark: Optional[StrictBool] = Field(default=None, alias="disableWatermark") + resource_owner_type: Optional[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + theme_mode: Optional[BetaSettingsServiceThemeMode] = Field(default=None, alias="themeMode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceBrandingSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of light_theme + if self.light_theme: + _dict['lightTheme'] = self.light_theme.to_dict() + # override the default output from pydantic by calling `to_dict()` of dark_theme + if self.dark_theme: + _dict['darkTheme'] = self.dark_theme.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceBrandingSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "lightTheme": BetaSettingsServiceTheme.from_dict(obj["lightTheme"]) if obj.get("lightTheme") is not None else None, + "darkTheme": BetaSettingsServiceTheme.from_dict(obj["darkTheme"]) if obj.get("darkTheme") is not None else None, + "fontUrl": obj.get("fontUrl"), + "hideLoginNameSuffix": obj.get("hideLoginNameSuffix"), + "disableWatermark": obj.get("disableWatermark"), + "resourceOwnerType": obj.get("resourceOwnerType"), + "themeMode": obj.get("themeMode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_connect_error.py b/zitadel_client/models/beta_settings_service_connect_error.py new file mode 100644 index 00000000..484547fb --- /dev/null +++ b/zitadel_client/models/beta_settings_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_settings_service_any import BetaSettingsServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaSettingsServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaSettingsServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_details.py b/zitadel_client/models/beta_settings_service_details.py new file mode 100644 index 00000000..aef21d21 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_details.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceDetails(BaseModel): + """ + BetaSettingsServiceDetails + """ # noqa: E501 + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sequence": obj.get("sequence"), + "changeDate": obj.get("changeDate"), + "resourceOwner": obj.get("resourceOwner"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_request_execution.py b/zitadel_client/models/beta_settings_service_domain_settings.py similarity index 64% rename from zitadel_client/models/action_service_beta_request_execution.py rename to zitadel_client/models/beta_settings_service_domain_settings.py index b4f9848a..341e8097 100644 --- a/zitadel_client/models/action_service_beta_request_execution.py +++ b/zitadel_client/models/beta_settings_service_domain_settings.py @@ -18,18 +18,19 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaRequestExecution(BaseModel): +class BetaSettingsServiceDomainSettings(BaseModel): """ - ActionServiceBetaRequestExecution + BetaSettingsServiceDomainSettings """ # noqa: E501 - method: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-method as condition.") - service: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-service as condition.") - all: Optional[StrictBool] = Field(default=None, description="All calls to any available services and methods as condition.") + login_name_includes_domain: Optional[StrictBool] = Field(default=None, alias="loginNameIncludesDomain") + require_org_domain_verification: Optional[StrictBool] = Field(default=None, alias="requireOrgDomainVerification") + smtp_sender_address_matches_instance_domain: Optional[StrictBool] = Field(default=None, alias="smtpSenderAddressMatchesInstanceDomain") + resource_owner_type: Optional[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") model_config = ConfigDict( populate_by_name=True, @@ -49,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaRequestExecution from a JSON string""" + """Create an instance of BetaSettingsServiceDomainSettings from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaRequestExecution from a dict""" + """Create an instance of BetaSettingsServiceDomainSettings from a dict""" if obj is None: return None @@ -82,9 +83,10 @@ 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") + "loginNameIncludesDomain": obj.get("loginNameIncludesDomain"), + "requireOrgDomainVerification": obj.get("requireOrgDomainVerification"), + "smtpSenderAddressMatchesInstanceDomain": obj.get("smtpSenderAddressMatchesInstanceDomain"), + "resourceOwnerType": obj.get("resourceOwnerType") }) return _obj diff --git a/zitadel_client/models/beta_settings_service_embedded_iframe_settings.py b/zitadel_client/models/beta_settings_service_embedded_iframe_settings.py new file mode 100644 index 00000000..62ff47b2 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_embedded_iframe_settings.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceEmbeddedIframeSettings(BaseModel): + """ + BetaSettingsServiceEmbeddedIframeSettings + """ # noqa: E501 + enabled: Optional[StrictBool] = None + allowed_origins: Optional[List[StrictStr]] = Field(default=None, alias="allowedOrigins") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceEmbeddedIframeSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceEmbeddedIframeSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "allowedOrigins": obj.get("allowedOrigins") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_create_web_key_request.py b/zitadel_client/models/beta_settings_service_get_active_identity_providers_request.py similarity index 71% rename from zitadel_client/models/web_key_service_create_web_key_request.py rename to zitadel_client/models/beta_settings_service_get_active_identity_providers_request.py index 0e416a5b..e836061c 100644 --- a/zitadel_client/models/web_key_service_create_web_key_request.py +++ b/zitadel_client/models/beta_settings_service_get_active_identity_providers_request.py @@ -18,19 +18,16 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.web_key_service_beta_ecdsa import WebKeyServiceBetaECDSA -from zitadel_client.models.web_key_service_beta_rsa import WebKeyServiceBetaRSA +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceCreateWebKeyRequest(BaseModel): +class BetaSettingsServiceGetActiveIdentityProvidersRequest(BaseModel): """ - WebKeyServiceCreateWebKeyRequest + BetaSettingsServiceGetActiveIdentityProvidersRequest """ # noqa: E501 - rsa: Optional[WebKeyServiceBetaRSA] = None - ecdsa: Optional[WebKeyServiceBetaECDSA] = None - ed25519: Optional[Dict[str, Any]] = None + ctx: Optional[BetaSettingsServiceRequestContext] = None model_config = ConfigDict( populate_by_name=True, @@ -50,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceCreateWebKeyRequest from a JSON string""" + """Create an instance of BetaSettingsServiceGetActiveIdentityProvidersRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,11 +68,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceCreateWebKeyRequest from a dict""" + """Create an instance of BetaSettingsServiceGetActiveIdentityProvidersRequest from a dict""" if obj is None: return None @@ -83,9 +83,7 @@ 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") + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_settings_service_get_active_identity_providers_response.py b/zitadel_client/models/beta_settings_service_get_active_identity_providers_response.py new file mode 100644 index 00000000..1a6ed77b --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_active_identity_providers_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_settings_service_identity_provider import BetaSettingsServiceIdentityProvider +from zitadel_client.models.beta_settings_service_list_details import BetaSettingsServiceListDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetActiveIdentityProvidersResponse(BaseModel): + """ + BetaSettingsServiceGetActiveIdentityProvidersResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceListDetails] = None + identity_providers: Optional[List[BetaSettingsServiceIdentityProvider]] = Field(default=None, alias="identityProviders") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetActiveIdentityProvidersResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in identity_providers (list) + _items = [] + if self.identity_providers: + for _item_identity_providers in self.identity_providers: + if _item_identity_providers: + _items.append(_item_identity_providers.to_dict()) + _dict['identityProviders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetActiveIdentityProvidersResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "identityProviders": [BetaSettingsServiceIdentityProvider.from_dict(_item) for _item in obj["identityProviders"]] if obj.get("identityProviders") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_branding_settings_request.py b/zitadel_client/models/beta_settings_service_get_branding_settings_request.py new file mode 100644 index 00000000..ea1ae1ad --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_branding_settings_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetBrandingSettingsRequest(BaseModel): + """ + BetaSettingsServiceGetBrandingSettingsRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetBrandingSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetBrandingSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_branding_settings_response.py b/zitadel_client/models/beta_settings_service_get_branding_settings_response.py new file mode 100644 index 00000000..66cf0b14 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_branding_settings_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_branding_settings import BetaSettingsServiceBrandingSettings +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetBrandingSettingsResponse(BaseModel): + """ + BetaSettingsServiceGetBrandingSettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServiceBrandingSettings] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetBrandingSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetBrandingSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServiceBrandingSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_domain_settings_request.py b/zitadel_client/models/beta_settings_service_get_domain_settings_request.py new file mode 100644 index 00000000..6f6675d0 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_domain_settings_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetDomainSettingsRequest(BaseModel): + """ + BetaSettingsServiceGetDomainSettingsRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetDomainSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetDomainSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_domain_settings_response.py b/zitadel_client/models/beta_settings_service_get_domain_settings_response.py new file mode 100644 index 00000000..7f2408d8 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_domain_settings_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_domain_settings import BetaSettingsServiceDomainSettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetDomainSettingsResponse(BaseModel): + """ + BetaSettingsServiceGetDomainSettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServiceDomainSettings] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetDomainSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetDomainSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServiceDomainSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_pagination_response.py b/zitadel_client/models/beta_settings_service_get_general_settings_response.py similarity index 75% rename from zitadel_client/models/action_service_beta_pagination_response.py rename to zitadel_client/models/beta_settings_service_get_general_settings_response.py index ffc0b972..8fb8d456 100644 --- a/zitadel_client/models/action_service_beta_pagination_response.py +++ b/zitadel_client/models/beta_settings_service_get_general_settings_response.py @@ -22,12 +22,13 @@ from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaPaginationResponse(BaseModel): +class BetaSettingsServiceGetGeneralSettingsResponse(BaseModel): """ - ActionServiceBetaPaginationResponse + BetaSettingsServiceGetGeneralSettingsResponse """ # 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") + default_org_id: Optional[StrictStr] = Field(default=None, alias="defaultOrgId") + default_language: Optional[StrictStr] = Field(default=None, alias="defaultLanguage") + supported_languages: Optional[List[StrictStr]] = Field(default=None, alias="supportedLanguages") model_config = ConfigDict( populate_by_name=True, @@ -47,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaPaginationResponse from a JSON string""" + """Create an instance of BetaSettingsServiceGetGeneralSettingsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaPaginationResponse from a dict""" + """Create an instance of BetaSettingsServiceGetGeneralSettingsResponse from a dict""" if obj is None: return None @@ -80,8 +81,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "totalResult": obj.get("totalResult"), - "appliedLimit": obj.get("appliedLimit") + "defaultOrgId": obj.get("defaultOrgId"), + "defaultLanguage": obj.get("defaultLanguage"), + "supportedLanguages": obj.get("supportedLanguages") }) return _obj diff --git a/zitadel_client/models/beta_settings_service_get_legal_and_support_settings_request.py b/zitadel_client/models/beta_settings_service_get_legal_and_support_settings_request.py new file mode 100644 index 00000000..6415a73e --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_legal_and_support_settings_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetLegalAndSupportSettingsRequest(BaseModel): + """ + BetaSettingsServiceGetLegalAndSupportSettingsRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLegalAndSupportSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLegalAndSupportSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_rpc_status.py b/zitadel_client/models/beta_settings_service_get_legal_and_support_settings_response.py similarity index 64% rename from zitadel_client/models/web_key_service_rpc_status.py rename to zitadel_client/models/beta_settings_service_get_legal_and_support_settings_response.py index 79ce9b53..6daeb907 100644 --- a/zitadel_client/models/web_key_service_rpc_status.py +++ b/zitadel_client/models/beta_settings_service_get_legal_and_support_settings_response.py @@ -17,19 +17,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.web_key_service_protobuf_any import WebKeyServiceProtobufAny +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_legal_and_support_settings import BetaSettingsServiceLegalAndSupportSettings from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceRpcStatus(BaseModel): +class BetaSettingsServiceGetLegalAndSupportSettingsResponse(BaseModel): """ - WebKeyServiceRpcStatus + BetaSettingsServiceGetLegalAndSupportSettingsResponse """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[WebKeyServiceProtobufAny]] = None + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServiceLegalAndSupportSettings] = None model_config = ConfigDict( populate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceRpcStatus from a JSON string""" + """Create an instance of BetaSettingsServiceGetLegalAndSupportSettingsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +70,17 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) - _items = [] + # override the default output from pydantic by calling `to_dict()` of details if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceRpcStatus from a dict""" + """Create an instance of BetaSettingsServiceGetLegalAndSupportSettingsResponse from a dict""" if obj is None: return None @@ -89,9 +88,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [WebKeyServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServiceLegalAndSupportSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_settings_service_get_lockout_settings_request.py b/zitadel_client/models/beta_settings_service_get_lockout_settings_request.py new file mode 100644 index 00000000..c4da0011 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_lockout_settings_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetLockoutSettingsRequest(BaseModel): + """ + BetaSettingsServiceGetLockoutSettingsRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLockoutSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLockoutSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_lockout_settings_response.py b/zitadel_client/models/beta_settings_service_get_lockout_settings_response.py new file mode 100644 index 00000000..214ebd93 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_lockout_settings_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_lockout_settings import BetaSettingsServiceLockoutSettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetLockoutSettingsResponse(BaseModel): + """ + BetaSettingsServiceGetLockoutSettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServiceLockoutSettings] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLockoutSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLockoutSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServiceLockoutSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_login_settings_request.py b/zitadel_client/models/beta_settings_service_get_login_settings_request.py new file mode 100644 index 00000000..d5b8d851 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_login_settings_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetLoginSettingsRequest(BaseModel): + """ + BetaSettingsServiceGetLoginSettingsRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLoginSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLoginSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_login_settings_response.py b/zitadel_client/models/beta_settings_service_get_login_settings_response.py new file mode 100644 index 00000000..09a89cd3 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_login_settings_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_login_settings import BetaSettingsServiceLoginSettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetLoginSettingsResponse(BaseModel): + """ + BetaSettingsServiceGetLoginSettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServiceLoginSettings] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLoginSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLoginSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServiceLoginSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_rsa.py b/zitadel_client/models/beta_settings_service_get_password_complexity_settings_request.py similarity index 71% rename from zitadel_client/models/web_key_service_beta_rsa.py rename to zitadel_client/models/beta_settings_service_get_password_complexity_settings_request.py index 732ce677..914879ce 100644 --- a/zitadel_client/models/web_key_service_beta_rsa.py +++ b/zitadel_client/models/beta_settings_service_get_password_complexity_settings_request.py @@ -18,18 +18,16 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.web_key_service_beta_rsa_bits import WebKeyServiceBetaRSABits -from zitadel_client.models.web_key_service_beta_rsa_hasher import WebKeyServiceBetaRSAHasher +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceBetaRSA(BaseModel): +class BetaSettingsServiceGetPasswordComplexitySettingsRequest(BaseModel): """ - WebKeyServiceBetaRSA + BetaSettingsServiceGetPasswordComplexitySettingsRequest """ # noqa: E501 - bits: Optional[WebKeyServiceBetaRSABits] = WebKeyServiceBetaRSABits.RSA_BITS_UNSPECIFIED - hasher: Optional[WebKeyServiceBetaRSAHasher] = WebKeyServiceBetaRSAHasher.RSA_HASHER_UNSPECIFIED + ctx: Optional[BetaSettingsServiceRequestContext] = None model_config = ConfigDict( populate_by_name=True, @@ -49,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaRSA from a JSON string""" + """Create an instance of BetaSettingsServiceGetPasswordComplexitySettingsRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,11 +68,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaRSA from a dict""" + """Create an instance of BetaSettingsServiceGetPasswordComplexitySettingsRequest from a dict""" if obj is None: return None @@ -82,8 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "bits": obj.get("bits") if obj.get("bits") is not None else WebKeyServiceBetaRSABits.RSA_BITS_UNSPECIFIED, - "hasher": obj.get("hasher") if obj.get("hasher") is not None else WebKeyServiceBetaRSAHasher.RSA_HASHER_UNSPECIFIED + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_settings_service_get_password_complexity_settings_response.py b/zitadel_client/models/beta_settings_service_get_password_complexity_settings_response.py new file mode 100644 index 00000000..e8f02634 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_password_complexity_settings_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_password_complexity_settings import BetaSettingsServicePasswordComplexitySettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetPasswordComplexitySettingsResponse(BaseModel): + """ + BetaSettingsServiceGetPasswordComplexitySettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServicePasswordComplexitySettings] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordComplexitySettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordComplexitySettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServicePasswordComplexitySettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_password_expiry_settings_request.py b/zitadel_client/models/beta_settings_service_get_password_expiry_settings_request.py new file mode 100644 index 00000000..9d8c79b2 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_password_expiry_settings_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetPasswordExpirySettingsRequest(BaseModel): + """ + BetaSettingsServiceGetPasswordExpirySettingsRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordExpirySettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordExpirySettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_password_expiry_settings_response.py b/zitadel_client/models/beta_settings_service_get_password_expiry_settings_response.py new file mode 100644 index 00000000..d7f43175 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_password_expiry_settings_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_password_expiry_settings import BetaSettingsServicePasswordExpirySettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetPasswordExpirySettingsResponse(BaseModel): + """ + BetaSettingsServiceGetPasswordExpirySettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServicePasswordExpirySettings] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordExpirySettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordExpirySettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServicePasswordExpirySettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_security_settings_response.py b/zitadel_client/models/beta_settings_service_get_security_settings_response.py new file mode 100644 index 00000000..c4b72651 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_security_settings_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_security_settings import BetaSettingsServiceSecuritySettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetSecuritySettingsResponse(BaseModel): + """ + BetaSettingsServiceGetSecuritySettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServiceSecuritySettings] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetSecuritySettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetSecuritySettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServiceSecuritySettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_identity_provider.py b/zitadel_client/models/beta_settings_service_identity_provider.py new file mode 100644 index 00000000..f30a0433 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_identity_provider.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_identity_provider_type import BetaSettingsServiceIdentityProviderType +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceIdentityProvider(BaseModel): + """ + BetaSettingsServiceIdentityProvider + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + type: Optional[BetaSettingsServiceIdentityProviderType] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceIdentityProvider from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceIdentityProvider from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_identity_provider_type.py b/zitadel_client/models/beta_settings_service_identity_provider_type.py new file mode 100644 index 00000000..e461055e --- /dev/null +++ b/zitadel_client/models/beta_settings_service_identity_provider_type.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSettingsServiceIdentityProviderType(str, Enum): + """ + BetaSettingsServiceIdentityProviderType + """ + + """ + allowed enum values + """ + IDENTITY_PROVIDER_TYPE_UNSPECIFIED = 'IDENTITY_PROVIDER_TYPE_UNSPECIFIED' + IDENTITY_PROVIDER_TYPE_OIDC = 'IDENTITY_PROVIDER_TYPE_OIDC' + IDENTITY_PROVIDER_TYPE_JWT = 'IDENTITY_PROVIDER_TYPE_JWT' + IDENTITY_PROVIDER_TYPE_LDAP = 'IDENTITY_PROVIDER_TYPE_LDAP' + IDENTITY_PROVIDER_TYPE_OAUTH = 'IDENTITY_PROVIDER_TYPE_OAUTH' + IDENTITY_PROVIDER_TYPE_AZURE_AD = 'IDENTITY_PROVIDER_TYPE_AZURE_AD' + IDENTITY_PROVIDER_TYPE_GITHUB = 'IDENTITY_PROVIDER_TYPE_GITHUB' + IDENTITY_PROVIDER_TYPE_GITHUB_ES = 'IDENTITY_PROVIDER_TYPE_GITHUB_ES' + IDENTITY_PROVIDER_TYPE_GITLAB = 'IDENTITY_PROVIDER_TYPE_GITLAB' + IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED = 'IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED' + IDENTITY_PROVIDER_TYPE_GOOGLE = 'IDENTITY_PROVIDER_TYPE_GOOGLE' + IDENTITY_PROVIDER_TYPE_SAML = 'IDENTITY_PROVIDER_TYPE_SAML' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSettingsServiceIdentityProviderType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_settings_service_legal_and_support_settings.py b/zitadel_client/models/beta_settings_service_legal_and_support_settings.py new file mode 100644 index 00000000..73b86e2c --- /dev/null +++ b/zitadel_client/models/beta_settings_service_legal_and_support_settings.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceLegalAndSupportSettings(BaseModel): + """ + BetaSettingsServiceLegalAndSupportSettings + """ # noqa: E501 + tos_link: Optional[StrictStr] = Field(default=None, alias="tosLink") + privacy_policy_link: Optional[StrictStr] = Field(default=None, alias="privacyPolicyLink") + help_link: Optional[StrictStr] = Field(default=None, alias="helpLink") + support_email: Optional[StrictStr] = Field(default=None, alias="supportEmail") + resource_owner_type: Optional[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + docs_link: Optional[StrictStr] = Field(default=None, alias="docsLink") + custom_link: Optional[StrictStr] = Field(default=None, alias="customLink") + custom_link_text: Optional[StrictStr] = Field(default=None, alias="customLinkText") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceLegalAndSupportSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceLegalAndSupportSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tosLink": obj.get("tosLink"), + "privacyPolicyLink": obj.get("privacyPolicyLink"), + "helpLink": obj.get("helpLink"), + "supportEmail": obj.get("supportEmail"), + "resourceOwnerType": obj.get("resourceOwnerType"), + "docsLink": obj.get("docsLink"), + "customLink": obj.get("customLink"), + "customLinkText": obj.get("customLinkText") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_list_details.py b/zitadel_client/models/beta_settings_service_list_details.py new file mode 100644 index 00000000..f7daf774 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_list_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceListDetails(BaseModel): + """ + BetaSettingsServiceListDetails + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceListDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceListDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "processedSequence": obj.get("processedSequence"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_target_search_filter.py b/zitadel_client/models/beta_settings_service_lockout_settings.py similarity index 61% rename from zitadel_client/models/action_service_beta_target_search_filter.py rename to zitadel_client/models/beta_settings_service_lockout_settings.py index 19fc84c4..415e7465 100644 --- a/zitadel_client/models/action_service_beta_target_search_filter.py +++ b/zitadel_client/models/beta_settings_service_lockout_settings.py @@ -18,18 +18,18 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_in_target_ids_filter import ActionServiceBetaInTargetIDsFilter -from zitadel_client.models.action_service_beta_target_name_filter import ActionServiceBetaTargetNameFilter +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaTargetSearchFilter(BaseModel): +class BetaSettingsServiceLockoutSettings(BaseModel): """ - ActionServiceBetaTargetSearchFilter + BetaSettingsServiceLockoutSettings """ # noqa: E501 - target_name_filter: Optional[ActionServiceBetaTargetNameFilter] = Field(default=None, alias="targetNameFilter") - in_target_ids_filter: Optional[ActionServiceBetaInTargetIDsFilter] = Field(default=None, alias="inTargetIdsFilter") + max_password_attempts: Optional[Any] = Field(default=None, alias="maxPasswordAttempts") + resource_owner_type: Optional[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + max_otp_attempts: Optional[Any] = Field(default=None, alias="maxOtpAttempts") model_config = ConfigDict( populate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaTargetSearchFilter from a JSON string""" + """Create an instance of BetaSettingsServiceLockoutSettings from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,11 +70,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if max_password_attempts (nullable) is None + # and model_fields_set contains the field + if self.max_password_attempts is None and "max_password_attempts" in self.model_fields_set: + _dict['maxPasswordAttempts'] = None + + # set to None if max_otp_attempts (nullable) is None + # and model_fields_set contains the field + if self.max_otp_attempts is None and "max_otp_attempts" in self.model_fields_set: + _dict['maxOtpAttempts'] = None + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaTargetSearchFilter from a dict""" + """Create an instance of BetaSettingsServiceLockoutSettings from a dict""" if obj is None: return None @@ -82,8 +92,9 @@ 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 + "maxPasswordAttempts": obj.get("maxPasswordAttempts"), + "resourceOwnerType": obj.get("resourceOwnerType"), + "maxOtpAttempts": obj.get("maxOtpAttempts") }) return _obj diff --git a/zitadel_client/models/beta_settings_service_login_settings.py b/zitadel_client/models/beta_settings_service_login_settings.py new file mode 100644 index 00000000..25333ad4 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_login_settings.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_settings_service_multi_factor_type import BetaSettingsServiceMultiFactorType +from zitadel_client.models.beta_settings_service_passkeys_type import BetaSettingsServicePasskeysType +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType +from zitadel_client.models.beta_settings_service_second_factor_type import BetaSettingsServiceSecondFactorType +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceLoginSettings(BaseModel): + """ + BetaSettingsServiceLoginSettings + """ # noqa: E501 + allow_username_password: Optional[StrictBool] = Field(default=None, alias="allowUsernamePassword") + allow_register: Optional[StrictBool] = Field(default=None, alias="allowRegister") + allow_external_idp: Optional[StrictBool] = Field(default=None, alias="allowExternalIdp") + force_mfa: Optional[StrictBool] = Field(default=None, alias="forceMfa") + passkeys_type: Optional[BetaSettingsServicePasskeysType] = Field(default=None, alias="passkeysType") + hide_password_reset: Optional[StrictBool] = Field(default=None, alias="hidePasswordReset") + ignore_unknown_usernames: Optional[StrictBool] = Field(default=None, alias="ignoreUnknownUsernames") + default_redirect_uri: Optional[StrictStr] = Field(default=None, alias="defaultRedirectUri") + password_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="passwordCheckLifetime") + external_login_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="externalLoginCheckLifetime") + mfa_init_skip_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="mfaInitSkipLifetime") + second_factor_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="secondFactorCheckLifetime") + multi_factor_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="multiFactorCheckLifetime") + second_factors: Optional[List[BetaSettingsServiceSecondFactorType]] = Field(default=None, alias="secondFactors") + multi_factors: Optional[List[BetaSettingsServiceMultiFactorType]] = Field(default=None, alias="multiFactors") + allow_domain_discovery: Optional[StrictBool] = Field(default=None, description="If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organization on success.", alias="allowDomainDiscovery") + disable_login_with_email: Optional[StrictBool] = Field(default=None, alias="disableLoginWithEmail") + disable_login_with_phone: Optional[StrictBool] = Field(default=None, alias="disableLoginWithPhone") + resource_owner_type: Optional[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + force_mfa_local_only: Optional[StrictBool] = Field(default=None, alias="forceMfaLocalOnly") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceLoginSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceLoginSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowUsernamePassword": obj.get("allowUsernamePassword"), + "allowRegister": obj.get("allowRegister"), + "allowExternalIdp": obj.get("allowExternalIdp"), + "forceMfa": obj.get("forceMfa"), + "passkeysType": obj.get("passkeysType"), + "hidePasswordReset": obj.get("hidePasswordReset"), + "ignoreUnknownUsernames": obj.get("ignoreUnknownUsernames"), + "defaultRedirectUri": obj.get("defaultRedirectUri"), + "passwordCheckLifetime": obj.get("passwordCheckLifetime"), + "externalLoginCheckLifetime": obj.get("externalLoginCheckLifetime"), + "mfaInitSkipLifetime": obj.get("mfaInitSkipLifetime"), + "secondFactorCheckLifetime": obj.get("secondFactorCheckLifetime"), + "multiFactorCheckLifetime": obj.get("multiFactorCheckLifetime"), + "secondFactors": obj.get("secondFactors"), + "multiFactors": obj.get("multiFactors"), + "allowDomainDiscovery": obj.get("allowDomainDiscovery"), + "disableLoginWithEmail": obj.get("disableLoginWithEmail"), + "disableLoginWithPhone": obj.get("disableLoginWithPhone"), + "resourceOwnerType": obj.get("resourceOwnerType"), + "forceMfaLocalOnly": obj.get("forceMfaLocalOnly") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_multi_factor_type.py b/zitadel_client/models/beta_settings_service_multi_factor_type.py new file mode 100644 index 00000000..57a3e77d --- /dev/null +++ b/zitadel_client/models/beta_settings_service_multi_factor_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSettingsServiceMultiFactorType(str, Enum): + """ + BetaSettingsServiceMultiFactorType + """ + + """ + allowed enum values + """ + MULTI_FACTOR_TYPE_UNSPECIFIED = 'MULTI_FACTOR_TYPE_UNSPECIFIED' + MULTI_FACTOR_TYPE_U2_F_WITH_VERIFICATION = 'MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSettingsServiceMultiFactorType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_settings_service_passkeys_type.py b/zitadel_client/models/beta_settings_service_passkeys_type.py new file mode 100644 index 00000000..4d3a86f5 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_passkeys_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSettingsServicePasskeysType(str, Enum): + """ + BetaSettingsServicePasskeysType + """ + + """ + allowed enum values + """ + PASSKEYS_TYPE_NOT_ALLOWED = 'PASSKEYS_TYPE_NOT_ALLOWED' + PASSKEYS_TYPE_ALLOWED = 'PASSKEYS_TYPE_ALLOWED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSettingsServicePasskeysType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/action_service_beta_response_execution.py b/zitadel_client/models/beta_settings_service_password_complexity_settings.py similarity index 58% rename from zitadel_client/models/action_service_beta_response_execution.py rename to zitadel_client/models/beta_settings_service_password_complexity_settings.py index 761ee4bd..3dcdcca4 100644 --- a/zitadel_client/models/action_service_beta_response_execution.py +++ b/zitadel_client/models/beta_settings_service_password_complexity_settings.py @@ -18,18 +18,21 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaResponseExecution(BaseModel): +class BetaSettingsServicePasswordComplexitySettings(BaseModel): """ - ActionServiceBetaResponseExecution + BetaSettingsServicePasswordComplexitySettings """ # noqa: E501 - method: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-method as condition.") - service: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-service as condition.") - all: Optional[StrictBool] = Field(default=None, description="All calls to any available services and methods as condition.") + min_length: Optional[Any] = Field(default=None, alias="minLength") + requires_uppercase: Optional[StrictBool] = Field(default=None, alias="requiresUppercase") + requires_lowercase: Optional[StrictBool] = Field(default=None, alias="requiresLowercase") + requires_number: Optional[StrictBool] = Field(default=None, alias="requiresNumber") + requires_symbol: Optional[StrictBool] = Field(default=None, alias="requiresSymbol") + resource_owner_type: Optional[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") model_config = ConfigDict( populate_by_name=True, @@ -49,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaResponseExecution from a JSON string""" + """Create an instance of BetaSettingsServicePasswordComplexitySettings from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,11 +73,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if min_length (nullable) is None + # and model_fields_set contains the field + if self.min_length is None and "min_length" in self.model_fields_set: + _dict['minLength'] = None + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaResponseExecution from a dict""" + """Create an instance of BetaSettingsServicePasswordComplexitySettings from a dict""" if obj is None: return None @@ -82,9 +90,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") + "minLength": obj.get("minLength"), + "requiresUppercase": obj.get("requiresUppercase"), + "requiresLowercase": obj.get("requiresLowercase"), + "requiresNumber": obj.get("requiresNumber"), + "requiresSymbol": obj.get("requiresSymbol"), + "resourceOwnerType": obj.get("resourceOwnerType") }) return _obj diff --git a/zitadel_client/models/beta_settings_service_password_expiry_settings.py b/zitadel_client/models/beta_settings_service_password_expiry_settings.py new file mode 100644 index 00000000..2aecdc9f --- /dev/null +++ b/zitadel_client/models/beta_settings_service_password_expiry_settings.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServicePasswordExpirySettings(BaseModel): + """ + BetaSettingsServicePasswordExpirySettings + """ # noqa: E501 + max_age_days: Optional[Any] = 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[Any] = 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[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServicePasswordExpirySettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if max_age_days (nullable) is None + # and model_fields_set contains the field + if self.max_age_days is None and "max_age_days" in self.model_fields_set: + _dict['maxAgeDays'] = None + + # set to None if expire_warn_days (nullable) is None + # and model_fields_set contains the field + if self.expire_warn_days is None and "expire_warn_days" in self.model_fields_set: + _dict['expireWarnDays'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServicePasswordExpirySettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "maxAgeDays": obj.get("maxAgeDays"), + "expireWarnDays": obj.get("expireWarnDays"), + "resourceOwnerType": obj.get("resourceOwnerType") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_request_context.py b/zitadel_client/models/beta_settings_service_request_context.py new file mode 100644 index 00000000..7cddef24 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_request_context.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.instance import Instance +from zitadel_client.models.org_id import OrgId +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETASETTINGSSERVICEREQUESTCONTEXT_ONE_OF_SCHEMAS = ["Instance", "OrgId"] + +class BetaSettingsServiceRequestContext(BaseModel): + """ + BetaSettingsServiceRequestContext + """ + # data type: Instance + oneof_schema_1_validator: Optional[Instance] = None + # data type: OrgId + oneof_schema_2_validator: Optional[OrgId] = None + actual_instance: Optional[Union[Instance, OrgId]] = None + one_of_schemas: Set[str] = { "Instance", "OrgId" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaSettingsServiceRequestContext.model_construct() + error_messages = [] + match = 0 + # validate data type: Instance + if not isinstance(v, Instance): + error_messages.append(f"Error! Input type `{type(v)}` is not `Instance`") + else: + match += 1 + # validate data type: OrgId + if not isinstance(v, OrgId): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrgId`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaSettingsServiceRequestContext with oneOf schemas: Instance, OrgId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaSettingsServiceRequestContext with oneOf schemas: Instance, OrgId. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Instance + try: + instance.actual_instance = Instance.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OrgId + try: + instance.actual_instance = OrgId.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaSettingsServiceRequestContext with oneOf schemas: Instance, OrgId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaSettingsServiceRequestContext with oneOf schemas: Instance, OrgId. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Instance, OrgId]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_settings_service_resource_owner_type.py b/zitadel_client/models/beta_settings_service_resource_owner_type.py new file mode 100644 index 00000000..dd22fd3b --- /dev/null +++ b/zitadel_client/models/beta_settings_service_resource_owner_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSettingsServiceResourceOwnerType(str, Enum): + """ + BetaSettingsServiceResourceOwnerType + """ + + """ + allowed enum values + """ + RESOURCE_OWNER_TYPE_UNSPECIFIED = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' + RESOURCE_OWNER_TYPE_INSTANCE = 'RESOURCE_OWNER_TYPE_INSTANCE' + RESOURCE_OWNER_TYPE_ORG = 'RESOURCE_OWNER_TYPE_ORG' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSettingsServiceResourceOwnerType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_settings_service_second_factor_type.py b/zitadel_client/models/beta_settings_service_second_factor_type.py new file mode 100644 index 00000000..8532a98a --- /dev/null +++ b/zitadel_client/models/beta_settings_service_second_factor_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSettingsServiceSecondFactorType(str, Enum): + """ + BetaSettingsServiceSecondFactorType + """ + + """ + allowed enum values + """ + SECOND_FACTOR_TYPE_UNSPECIFIED = 'SECOND_FACTOR_TYPE_UNSPECIFIED' + SECOND_FACTOR_TYPE_OTP = 'SECOND_FACTOR_TYPE_OTP' + SECOND_FACTOR_TYPE_U2_F = 'SECOND_FACTOR_TYPE_U2F' + SECOND_FACTOR_TYPE_OTP_EMAIL = 'SECOND_FACTOR_TYPE_OTP_EMAIL' + SECOND_FACTOR_TYPE_OTP_SMS = 'SECOND_FACTOR_TYPE_OTP_SMS' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSettingsServiceSecondFactorType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_settings_service_security_settings.py b/zitadel_client/models/beta_settings_service_security_settings.py new file mode 100644 index 00000000..7eb38e83 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_security_settings.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_embedded_iframe_settings import BetaSettingsServiceEmbeddedIframeSettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceSecuritySettings(BaseModel): + """ + BetaSettingsServiceSecuritySettings + """ # noqa: E501 + embedded_iframe: Optional[BetaSettingsServiceEmbeddedIframeSettings] = Field(default=None, alias="embeddedIframe") + enable_impersonation: Optional[StrictBool] = Field(default=None, alias="enableImpersonation") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceSecuritySettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of embedded_iframe + if self.embedded_iframe: + _dict['embeddedIframe'] = self.embedded_iframe.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceSecuritySettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "embeddedIframe": BetaSettingsServiceEmbeddedIframeSettings.from_dict(obj["embeddedIframe"]) if obj.get("embeddedIframe") is not None else None, + "enableImpersonation": obj.get("enableImpersonation") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_set_security_settings_request.py b/zitadel_client/models/beta_settings_service_set_security_settings_request.py new file mode 100644 index 00000000..41b1caaf --- /dev/null +++ b/zitadel_client/models/beta_settings_service_set_security_settings_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_embedded_iframe_settings import BetaSettingsServiceEmbeddedIframeSettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceSetSecuritySettingsRequest(BaseModel): + """ + BetaSettingsServiceSetSecuritySettingsRequest + """ # noqa: E501 + embedded_iframe: Optional[BetaSettingsServiceEmbeddedIframeSettings] = Field(default=None, alias="embeddedIframe") + enable_impersonation: Optional[StrictBool] = Field(default=None, alias="enableImpersonation") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceSetSecuritySettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of embedded_iframe + if self.embedded_iframe: + _dict['embeddedIframe'] = self.embedded_iframe.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceSetSecuritySettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "embeddedIframe": BetaSettingsServiceEmbeddedIframeSettings.from_dict(obj["embeddedIframe"]) if obj.get("embeddedIframe") is not None else None, + "enableImpersonation": obj.get("enableImpersonation") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_set_security_settings_response.py b/zitadel_client/models/beta_settings_service_set_security_settings_response.py new file mode 100644 index 00000000..294e170c --- /dev/null +++ b/zitadel_client/models/beta_settings_service_set_security_settings_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceSetSecuritySettingsResponse(BaseModel): + """ + BetaSettingsServiceSetSecuritySettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceSetSecuritySettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceSetSecuritySettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_theme.py b/zitadel_client/models/beta_settings_service_theme.py new file mode 100644 index 00000000..96e65f3d --- /dev/null +++ b/zitadel_client/models/beta_settings_service_theme.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceTheme(BaseModel): + """ + BetaSettingsServiceTheme + """ # noqa: E501 + primary_color: Optional[StrictStr] = Field(default=None, description="hex value for primary color", alias="primaryColor") + background_color: Optional[StrictStr] = Field(default=None, description="hex value for background color", alias="backgroundColor") + warn_color: Optional[StrictStr] = Field(default=None, description="hex value for warning color", alias="warnColor") + font_color: Optional[StrictStr] = Field(default=None, description="hex value for font color", alias="fontColor") + logo_url: Optional[StrictStr] = Field(default=None, description="url where the logo is served", alias="logoUrl") + icon_url: Optional[StrictStr] = Field(default=None, description="url where the icon is served", alias="iconUrl") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceTheme from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceTheme from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "primaryColor": obj.get("primaryColor"), + "backgroundColor": obj.get("backgroundColor"), + "warnColor": obj.get("warnColor"), + "fontColor": obj.get("fontColor"), + "logoUrl": obj.get("logoUrl"), + "iconUrl": obj.get("iconUrl") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_theme_mode.py b/zitadel_client/models/beta_settings_service_theme_mode.py new file mode 100644 index 00000000..0a1e8f03 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_theme_mode.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSettingsServiceThemeMode(str, Enum): + """ + BetaSettingsServiceThemeMode + """ + + """ + allowed enum values + """ + THEME_MODE_UNSPECIFIED = 'THEME_MODE_UNSPECIFIED' + THEME_MODE_AUTO = 'THEME_MODE_AUTO' + THEME_MODE_LIGHT = 'THEME_MODE_LIGHT' + THEME_MODE_DARK = 'THEME_MODE_DARK' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSettingsServiceThemeMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_access_token_type.py b/zitadel_client/models/beta_user_service_access_token_type.py new file mode 100644 index 00000000..147dec91 --- /dev/null +++ b/zitadel_client/models/beta_user_service_access_token_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceAccessTokenType(str, Enum): + """ + BetaUserServiceAccessTokenType + """ + + """ + allowed enum values + """ + ACCESS_TOKEN_TYPE_BEARER = 'ACCESS_TOKEN_TYPE_BEARER' + ACCESS_TOKEN_TYPE_JWT = 'ACCESS_TOKEN_TYPE_JWT' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceAccessTokenType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_add_human_user_request.py b/zitadel_client/models/beta_user_service_add_human_user_request.py new file mode 100644 index 00000000..c2962778 --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_human_user_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.hashed_password2 import HashedPassword2 +from zitadel_client.models.password2 import Password2 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICEADDHUMANUSERREQUEST_ONE_OF_SCHEMAS = ["HashedPassword2", "Password2"] + +class BetaUserServiceAddHumanUserRequest(BaseModel): + """ + BetaUserServiceAddHumanUserRequest + """ + # data type: HashedPassword2 + oneof_schema_1_validator: Optional[HashedPassword2] = None + # data type: Password2 + oneof_schema_2_validator: Optional[Password2] = None + actual_instance: Optional[Union[HashedPassword2, Password2]] = None + one_of_schemas: Set[str] = { "HashedPassword2", "Password2" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceAddHumanUserRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: HashedPassword2 + if not isinstance(v, HashedPassword2): + error_messages.append(f"Error! Input type `{type(v)}` is not `HashedPassword2`") + else: + match += 1 + # validate data type: Password2 + if not isinstance(v, Password2): + error_messages.append(f"Error! Input type `{type(v)}` is not `Password2`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceAddHumanUserRequest with oneOf schemas: HashedPassword2, Password2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceAddHumanUserRequest with oneOf schemas: HashedPassword2, Password2. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into HashedPassword2 + try: + instance.actual_instance = HashedPassword2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Password2 + try: + instance.actual_instance = Password2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceAddHumanUserRequest with oneOf schemas: HashedPassword2, Password2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceAddHumanUserRequest with oneOf schemas: HashedPassword2, Password2. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], HashedPassword2, Password2]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_add_human_user_response.py b/zitadel_client/models/beta_user_service_add_human_user_response.py new file mode 100644 index 00000000..d1cff4e8 --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_human_user_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddHumanUserResponse(BaseModel): + """ + BetaUserServiceAddHumanUserResponse + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + details: Optional[BetaUserServiceDetails] = None + email_code: Optional[StrictStr] = Field(default=None, alias="emailCode") + phone_code: Optional[StrictStr] = Field(default=None, alias="phoneCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddHumanUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddHumanUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "emailCode": obj.get("emailCode"), + "phoneCode": obj.get("phoneCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_add_idp_link_request.py b/zitadel_client/models/beta_user_service_add_idp_link_request.py new file mode 100644 index 00000000..8f58e971 --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_idp_link_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_idp_link import BetaUserServiceIDPLink +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddIDPLinkRequest(BaseModel): + """ + BetaUserServiceAddIDPLinkRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + idp_link: Optional[BetaUserServiceIDPLink] = Field(default=None, alias="idpLink") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddIDPLinkRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of idp_link + if self.idp_link: + _dict['idpLink'] = self.idp_link.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddIDPLinkRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "idpLink": BetaUserServiceIDPLink.from_dict(obj["idpLink"]) if obj.get("idpLink") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_add_idp_link_response.py b/zitadel_client/models/beta_user_service_add_idp_link_response.py new file mode 100644 index 00000000..fe6e7cf9 --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_idp_link_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddIDPLinkResponse(BaseModel): + """ + BetaUserServiceAddIDPLinkResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddIDPLinkResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddIDPLinkResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_add_otp_email_request.py b/zitadel_client/models/beta_user_service_add_otp_email_request.py new file mode 100644 index 00000000..a6b96b2b --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_otp_email_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddOTPEmailRequest(BaseModel): + """ + BetaUserServiceAddOTPEmailRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPEmailRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPEmailRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_add_otp_email_response.py b/zitadel_client/models/beta_user_service_add_otp_email_response.py new file mode 100644 index 00000000..c8601a05 --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_otp_email_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddOTPEmailResponse(BaseModel): + """ + BetaUserServiceAddOTPEmailResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPEmailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPEmailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_add_otpsms_request.py b/zitadel_client/models/beta_user_service_add_otpsms_request.py new file mode 100644 index 00000000..479fad0c --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_otpsms_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddOTPSMSRequest(BaseModel): + """ + BetaUserServiceAddOTPSMSRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPSMSRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPSMSRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_add_otpsms_response.py b/zitadel_client/models/beta_user_service_add_otpsms_response.py new file mode 100644 index 00000000..c7ace8ba --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_otpsms_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddOTPSMSResponse(BaseModel): + """ + BetaUserServiceAddOTPSMSResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPSMSResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPSMSResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/session_service_rpc_status.py b/zitadel_client/models/beta_user_service_and_query.py similarity index 71% rename from zitadel_client/models/session_service_rpc_status.py rename to zitadel_client/models/beta_user_service_and_query.py index 1b4c1621..2d2799eb 100644 --- a/zitadel_client/models/session_service_rpc_status.py +++ b/zitadel_client/models/beta_user_service_and_query.py @@ -17,19 +17,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.session_service_protobuf_any import SessionServiceProtobufAny from typing import Optional, Set from typing_extensions import Self -class SessionServiceRpcStatus(BaseModel): +class BetaUserServiceAndQuery(BaseModel): """ - SessionServiceRpcStatus + Connect multiple sub-condition with and AND operator. """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[SessionServiceProtobufAny]] = None + queries: Optional[List[BetaUserServiceSearchQuery]] = None model_config = ConfigDict( populate_by_name=True, @@ -49,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceRpcStatus from a JSON string""" + """Create an instance of BetaUserServiceAndQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +67,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) + # override the default output from pydantic by calling `to_dict()` of each item in queries (list) _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + if self.queries: + for _item_queries in self.queries: + if _item_queries: + _items.append(_item_queries.to_dict()) + _dict['queries'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceRpcStatus from a dict""" + """Create an instance of BetaUserServiceAndQuery from a dict""" if obj is None: return None @@ -89,10 +86,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [SessionServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "queries": [BetaUserServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None }) return _obj +from zitadel_client.models.beta_user_service_search_query import BetaUserServiceSearchQuery +# TODO: Rewrite to not use raise_errors +BetaUserServiceAndQuery.model_rebuild(raise_errors=False) diff --git a/zitadel_client/models/beta_user_service_any.py b/zitadel_client/models/beta_user_service_any.py new file mode 100644 index 00000000..d533bbed --- /dev/null +++ b/zitadel_client/models/beta_user_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_authentication_method_type.py b/zitadel_client/models/beta_user_service_authentication_method_type.py new file mode 100644 index 00000000..7f0a2e2c --- /dev/null +++ b/zitadel_client/models/beta_user_service_authentication_method_type.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceAuthenticationMethodType(str, Enum): + """ + BetaUserServiceAuthenticationMethodType + """ + + """ + allowed enum values + """ + AUTHENTICATION_METHOD_TYPE_UNSPECIFIED = 'AUTHENTICATION_METHOD_TYPE_UNSPECIFIED' + AUTHENTICATION_METHOD_TYPE_PASSWORD = 'AUTHENTICATION_METHOD_TYPE_PASSWORD' + AUTHENTICATION_METHOD_TYPE_PASSKEY = 'AUTHENTICATION_METHOD_TYPE_PASSKEY' + AUTHENTICATION_METHOD_TYPE_IDP = 'AUTHENTICATION_METHOD_TYPE_IDP' + AUTHENTICATION_METHOD_TYPE_TOTP = 'AUTHENTICATION_METHOD_TYPE_TOTP' + AUTHENTICATION_METHOD_TYPE_U2_F = 'AUTHENTICATION_METHOD_TYPE_U2F' + AUTHENTICATION_METHOD_TYPE_OTP_SMS = 'AUTHENTICATION_METHOD_TYPE_OTP_SMS' + AUTHENTICATION_METHOD_TYPE_OTP_EMAIL = 'AUTHENTICATION_METHOD_TYPE_OTP_EMAIL' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceAuthenticationMethodType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_connect_error.py b/zitadel_client/models/beta_user_service_connect_error.py new file mode 100644 index 00000000..f4a82f7d --- /dev/null +++ b/zitadel_client/models/beta_user_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_user_service_any import BetaUserServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaUserServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaUserServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_create_passkey_registration_link_request.py b/zitadel_client/models/beta_user_service_create_passkey_registration_link_request.py new file mode 100644 index 00000000..44b6f88d --- /dev/null +++ b/zitadel_client/models/beta_user_service_create_passkey_registration_link_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.return_code11 import ReturnCode11 +from zitadel_client.models.send_link2 import SendLink2 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICECREATEPASSKEYREGISTRATIONLINKREQUEST_ONE_OF_SCHEMAS = ["ReturnCode11", "SendLink2"] + +class BetaUserServiceCreatePasskeyRegistrationLinkRequest(BaseModel): + """ + BetaUserServiceCreatePasskeyRegistrationLinkRequest + """ + # data type: ReturnCode11 + oneof_schema_1_validator: Optional[ReturnCode11] = None + # data type: SendLink2 + oneof_schema_2_validator: Optional[SendLink2] = None + actual_instance: Optional[Union[ReturnCode11, SendLink2]] = None + one_of_schemas: Set[str] = { "ReturnCode11", "SendLink2" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceCreatePasskeyRegistrationLinkRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: ReturnCode11 + if not isinstance(v, ReturnCode11): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode11`") + else: + match += 1 + # validate data type: SendLink2 + if not isinstance(v, SendLink2): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendLink2`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceCreatePasskeyRegistrationLinkRequest with oneOf schemas: ReturnCode11, SendLink2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceCreatePasskeyRegistrationLinkRequest with oneOf schemas: ReturnCode11, SendLink2. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ReturnCode11 + try: + instance.actual_instance = ReturnCode11.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendLink2 + try: + instance.actual_instance = SendLink2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceCreatePasskeyRegistrationLinkRequest with oneOf schemas: ReturnCode11, SendLink2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceCreatePasskeyRegistrationLinkRequest with oneOf schemas: ReturnCode11, SendLink2. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ReturnCode11, SendLink2]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_create_passkey_registration_link_response.py b/zitadel_client/models/beta_user_service_create_passkey_registration_link_response.py new file mode 100644 index 00000000..f6a46ed8 --- /dev/null +++ b/zitadel_client/models/beta_user_service_create_passkey_registration_link_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from zitadel_client.models.beta_user_service_passkey_registration_code import BetaUserServicePasskeyRegistrationCode +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceCreatePasskeyRegistrationLinkResponse(BaseModel): + """ + BetaUserServiceCreatePasskeyRegistrationLinkResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + code: Optional[BetaUserServicePasskeyRegistrationCode] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceCreatePasskeyRegistrationLinkResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of code + if self.code: + _dict['code'] = self.code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceCreatePasskeyRegistrationLinkResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "code": BetaUserServicePasskeyRegistrationCode.from_dict(obj["code"]) if obj.get("code") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_deactivate_user_request.py b/zitadel_client/models/beta_user_service_deactivate_user_request.py new file mode 100644 index 00000000..9d536733 --- /dev/null +++ b/zitadel_client/models/beta_user_service_deactivate_user_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceDeactivateUserRequest(BaseModel): + """ + BetaUserServiceDeactivateUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceDeactivateUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceDeactivateUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_create_web_key_response.py b/zitadel_client/models/beta_user_service_deactivate_user_response.py similarity index 75% rename from zitadel_client/models/web_key_service_beta_create_web_key_response.py rename to zitadel_client/models/beta_user_service_deactivate_user_response.py index 6fac779d..b939f014 100644 --- a/zitadel_client/models/web_key_service_beta_create_web_key_response.py +++ b/zitadel_client/models/beta_user_service_deactivate_user_response.py @@ -17,18 +17,17 @@ import re # noqa: F401 import json -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceBetaCreateWebKeyResponse(BaseModel): +class BetaUserServiceDeactivateUserResponse(BaseModel): """ - WebKeyServiceBetaCreateWebKeyResponse + BetaUserServiceDeactivateUserResponse """ # 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") + details: Optional[BetaUserServiceDetails] = None model_config = ConfigDict( populate_by_name=True, @@ -48,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaCreateWebKeyResponse from a JSON string""" + """Create an instance of BetaUserServiceDeactivateUserResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -69,11 +68,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaCreateWebKeyResponse from a dict""" + """Create an instance of BetaUserServiceDeactivateUserResponse from a dict""" if obj is None: return None @@ -81,8 +83,7 @@ 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") + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_user_service_delete_user_request.py b/zitadel_client/models/beta_user_service_delete_user_request.py new file mode 100644 index 00000000..1a53fb0a --- /dev/null +++ b/zitadel_client/models/beta_user_service_delete_user_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceDeleteUserRequest(BaseModel): + """ + BetaUserServiceDeleteUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceDeleteUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceDeleteUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_delete_user_response.py b/zitadel_client/models/beta_user_service_delete_user_response.py new file mode 100644 index 00000000..7d4abfc3 --- /dev/null +++ b/zitadel_client/models/beta_user_service_delete_user_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceDeleteUserResponse(BaseModel): + """ + BetaUserServiceDeleteUserResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceDeleteUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceDeleteUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_details.py b/zitadel_client/models/beta_user_service_details.py new file mode 100644 index 00000000..20d9bb9d --- /dev/null +++ b/zitadel_client/models/beta_user_service_details.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceDetails(BaseModel): + """ + BetaUserServiceDetails + """ # noqa: E501 + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sequence": obj.get("sequence"), + "changeDate": obj.get("changeDate"), + "resourceOwner": obj.get("resourceOwner"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_display_name_query.py b/zitadel_client/models/beta_user_service_display_name_query.py new file mode 100644 index 00000000..21bd03c6 --- /dev/null +++ b/zitadel_client/models/beta_user_service_display_name_query.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceDisplayNameQuery(BaseModel): + """ + Query for users with a specific display name. + """ # noqa: E501 + display_name: StrictStr = Field(alias="displayName") + method: Optional[BetaUserServiceTextQueryMethod] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceDisplayNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceDisplayNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "displayName": obj.get("displayName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_email_query.py b/zitadel_client/models/beta_user_service_email_query.py new file mode 100644 index 00000000..db5308e5 --- /dev/null +++ b/zitadel_client/models/beta_user_service_email_query.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceEmailQuery(BaseModel): + """ + Query for users with a specific email. + """ # noqa: E501 + email_address: StrictStr = Field(alias="emailAddress") + method: Optional[BetaUserServiceTextQueryMethod] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceEmailQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceEmailQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "emailAddress": obj.get("emailAddress"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_first_name_query.py b/zitadel_client/models/beta_user_service_first_name_query.py new file mode 100644 index 00000000..875d920c --- /dev/null +++ b/zitadel_client/models/beta_user_service_first_name_query.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceFirstNameQuery(BaseModel): + """ + Query for users with a specific first name. + """ # noqa: E501 + first_name: StrictStr = Field(alias="firstName") + method: Optional[BetaUserServiceTextQueryMethod] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceFirstNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceFirstNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "firstName": obj.get("firstName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_gender.py b/zitadel_client/models/beta_user_service_gender.py new file mode 100644 index 00000000..d3f0d14f --- /dev/null +++ b/zitadel_client/models/beta_user_service_gender.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceGender(str, Enum): + """ + BetaUserServiceGender + """ + + """ + allowed enum values + """ + GENDER_UNSPECIFIED = 'GENDER_UNSPECIFIED' + GENDER_FEMALE = 'GENDER_FEMALE' + GENDER_MALE = 'GENDER_MALE' + GENDER_DIVERSE = 'GENDER_DIVERSE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceGender from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_get_user_by_id_request.py b/zitadel_client/models/beta_user_service_get_user_by_id_request.py new file mode 100644 index 00000000..0c172011 --- /dev/null +++ b/zitadel_client/models/beta_user_service_get_user_by_id_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceGetUserByIDRequest(BaseModel): + """ + BetaUserServiceGetUserByIDRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceGetUserByIDRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceGetUserByIDRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/feature_service_rpc_status.py b/zitadel_client/models/beta_user_service_get_user_by_id_response.py similarity index 68% rename from zitadel_client/models/feature_service_rpc_status.py rename to zitadel_client/models/beta_user_service_get_user_by_id_response.py index 2cd26f2b..8fec145d 100644 --- a/zitadel_client/models/feature_service_rpc_status.py +++ b/zitadel_client/models/beta_user_service_get_user_by_id_response.py @@ -17,19 +17,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.feature_service_protobuf_any import FeatureServiceProtobufAny +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from zitadel_client.models.beta_user_service_user import BetaUserServiceUser from typing import Optional, Set from typing_extensions import Self -class FeatureServiceRpcStatus(BaseModel): +class BetaUserServiceGetUserByIDResponse(BaseModel): """ - FeatureServiceRpcStatus + BetaUserServiceGetUserByIDResponse """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[FeatureServiceProtobufAny]] = None + details: Optional[BetaUserServiceDetails] = None + user: Optional[BetaUserServiceUser] = None model_config = ConfigDict( populate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FeatureServiceRpcStatus from a JSON string""" + """Create an instance of BetaUserServiceGetUserByIDResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +70,17 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) - _items = [] + # override the default output from pydantic by calling `to_dict()` of details if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FeatureServiceRpcStatus from a dict""" + """Create an instance of BetaUserServiceGetUserByIDResponse from a dict""" if obj is None: return None @@ -89,9 +88,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [FeatureServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "user": BetaUserServiceUser.from_dict(obj["user"]) if obj.get("user") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_user_service_hashed_password.py b/zitadel_client/models/beta_user_service_hashed_password.py new file mode 100644 index 00000000..a10a7373 --- /dev/null +++ b/zitadel_client/models/beta_user_service_hashed_password.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceHashedPassword(BaseModel): + """ + BetaUserServiceHashedPassword + """ # noqa: E501 + hash: StrictStr + change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceHashedPassword from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceHashedPassword from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hash": obj.get("hash"), + "changeRequired": obj.get("changeRequired") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_human_email.py b/zitadel_client/models/beta_user_service_human_email.py new file mode 100644 index 00000000..4c07e516 --- /dev/null +++ b/zitadel_client/models/beta_user_service_human_email.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceHumanEmail(BaseModel): + """ + BetaUserServiceHumanEmail + """ # noqa: E501 + email: Optional[StrictStr] = None + is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanEmail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanEmail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "isVerified": obj.get("isVerified") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_human_phone.py b/zitadel_client/models/beta_user_service_human_phone.py new file mode 100644 index 00000000..3a8159b3 --- /dev/null +++ b/zitadel_client/models/beta_user_service_human_phone.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceHumanPhone(BaseModel): + """ + BetaUserServiceHumanPhone + """ # noqa: E501 + phone: Optional[StrictStr] = None + is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanPhone from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanPhone from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "phone": obj.get("phone"), + "isVerified": obj.get("isVerified") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_human_profile.py b/zitadel_client/models/beta_user_service_human_profile.py new file mode 100644 index 00000000..35d798f4 --- /dev/null +++ b/zitadel_client/models/beta_user_service_human_profile.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_gender import BetaUserServiceGender +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceHumanProfile(BaseModel): + """ + BetaUserServiceHumanProfile + """ # noqa: E501 + given_name: Optional[StrictStr] = Field(default=None, alias="givenName") + family_name: Optional[StrictStr] = Field(default=None, alias="familyName") + nick_name: Optional[StrictStr] = Field(default=None, alias="nickName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + preferred_language: Optional[StrictStr] = Field(default=None, alias="preferredLanguage") + gender: Optional[BetaUserServiceGender] = None + avatar_url: Optional[StrictStr] = Field(default=None, alias="avatarUrl") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanProfile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict['nickName'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if preferred_language (nullable) is None + # and model_fields_set contains the field + if self.preferred_language is None and "preferred_language" in self.model_fields_set: + _dict['preferredLanguage'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "givenName": obj.get("givenName"), + "familyName": obj.get("familyName"), + "nickName": obj.get("nickName"), + "displayName": obj.get("displayName"), + "preferredLanguage": obj.get("preferredLanguage"), + "gender": obj.get("gender"), + "avatarUrl": obj.get("avatarUrl") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_human_user.py b/zitadel_client/models/beta_user_service_human_user.py new file mode 100644 index 00000000..17250b08 --- /dev/null +++ b/zitadel_client/models/beta_user_service_human_user.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_user_service_human_email import BetaUserServiceHumanEmail +from zitadel_client.models.beta_user_service_human_phone import BetaUserServiceHumanPhone +from zitadel_client.models.beta_user_service_human_profile import BetaUserServiceHumanProfile +from zitadel_client.models.beta_user_service_user_state import BetaUserServiceUserState +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceHumanUser(BaseModel): + """ + BetaUserServiceHumanUser + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the user.", alias="userId") + state: Optional[BetaUserServiceUserState] = None + username: Optional[StrictStr] = Field(default=None, description="Username of the user, which can be globally unique or unique on organization level.") + login_names: Optional[List[StrictStr]] = Field(default=None, description="Possible usable login names for the user.", alias="loginNames") + preferred_login_name: Optional[StrictStr] = Field(default=None, description="Preferred login name of the user.", alias="preferredLoginName") + profile: Optional[BetaUserServiceHumanProfile] = None + email: Optional[BetaUserServiceHumanEmail] = None + phone: Optional[BetaUserServiceHumanPhone] = None + 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="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="passwordChanged") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of profile + if self.profile: + _dict['profile'] = self.profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of email + if self.email: + _dict['email'] = self.email.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone + if self.phone: + _dict['phone'] = self.phone.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "state": obj.get("state"), + "username": obj.get("username"), + "loginNames": obj.get("loginNames"), + "preferredLoginName": obj.get("preferredLoginName"), + "profile": BetaUserServiceHumanProfile.from_dict(obj["profile"]) if obj.get("profile") is not None else None, + "email": BetaUserServiceHumanEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, + "phone": BetaUserServiceHumanPhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, + "passwordChangeRequired": obj.get("passwordChangeRequired"), + "passwordChanged": obj.get("passwordChanged") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_idp_information.py b/zitadel_client/models/beta_user_service_idp_information.py new file mode 100644 index 00000000..11da21ce --- /dev/null +++ b/zitadel_client/models/beta_user_service_idp_information.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.ldap4 import Ldap4 +from zitadel_client.models.oauth2 import Oauth2 +from zitadel_client.models.saml2 import Saml2 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICEIDPINFORMATION_ONE_OF_SCHEMAS = ["Ldap4", "Oauth2", "Saml2"] + +class BetaUserServiceIDPInformation(BaseModel): + """ + BetaUserServiceIDPInformation + """ + # data type: Ldap4 + oneof_schema_1_validator: Optional[Ldap4] = None + # data type: Oauth2 + oneof_schema_2_validator: Optional[Oauth2] = None + # data type: Saml2 + oneof_schema_3_validator: Optional[Saml2] = None + actual_instance: Optional[Union[Ldap4, Oauth2, Saml2]] = None + one_of_schemas: Set[str] = { "Ldap4", "Oauth2", "Saml2" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceIDPInformation.model_construct() + error_messages = [] + match = 0 + # validate data type: Ldap4 + if not isinstance(v, Ldap4): + error_messages.append(f"Error! Input type `{type(v)}` is not `Ldap4`") + else: + match += 1 + # validate data type: Oauth2 + if not isinstance(v, Oauth2): + error_messages.append(f"Error! Input type `{type(v)}` is not `Oauth2`") + else: + match += 1 + # validate data type: Saml2 + if not isinstance(v, Saml2): + error_messages.append(f"Error! Input type `{type(v)}` is not `Saml2`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceIDPInformation with oneOf schemas: Ldap4, Oauth2, Saml2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceIDPInformation with oneOf schemas: Ldap4, Oauth2, Saml2. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Ldap4 + try: + instance.actual_instance = Ldap4.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Oauth2 + try: + instance.actual_instance = Oauth2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Saml2 + try: + instance.actual_instance = Saml2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceIDPInformation with oneOf schemas: Ldap4, Oauth2, Saml2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceIDPInformation with oneOf schemas: Ldap4, Oauth2, Saml2. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Ldap4, Oauth2, Saml2]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_idp_intent.py b/zitadel_client/models/beta_user_service_idp_intent.py new file mode 100644 index 00000000..541134fc --- /dev/null +++ b/zitadel_client/models/beta_user_service_idp_intent.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceIDPIntent(BaseModel): + """ + BetaUserServiceIDPIntent + """ # noqa: E501 + idp_intent_id: Optional[StrictStr] = Field(default=None, alias="idpIntentId") + idp_intent_token: Optional[StrictStr] = Field(default=None, alias="idpIntentToken") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPIntent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPIntent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idpIntentId": obj.get("idpIntentId"), + "idpIntentToken": obj.get("idpIntentToken"), + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_idp_link.py b/zitadel_client/models/beta_user_service_idp_link.py new file mode 100644 index 00000000..0926dcab --- /dev/null +++ b/zitadel_client/models/beta_user_service_idp_link.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceIDPLink(BaseModel): + """ + BetaUserServiceIDPLink + """ # noqa: E501 + idp_id: Optional[StrictStr] = Field(default=None, alias="idpId") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + user_name: Optional[StrictStr] = Field(default=None, alias="userName") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idpId": obj.get("idpId"), + "userId": obj.get("userId"), + "userName": obj.get("userName") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_idpldap_access_information.py b/zitadel_client/models/beta_user_service_idpldap_access_information.py new file mode 100644 index 00000000..690e170a --- /dev/null +++ b/zitadel_client/models/beta_user_service_idpldap_access_information.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_value import BetaUserServiceValue +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceIDPLDAPAccessInformation(BaseModel): + """ + BetaUserServiceIDPLDAPAccessInformation + """ # noqa: E501 + attributes: Optional[Dict[str, Optional[BetaUserServiceValue]]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPLDAPAccessInformation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each value in attributes (dict) + _field_dict = {} + if self.attributes: + for _key_attributes in self.attributes: + if self.attributes[_key_attributes]: + _field_dict[_key_attributes] = self.attributes[_key_attributes].to_dict() + _dict['attributes'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPLDAPAccessInformation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": dict( + (_k, BetaUserServiceValue.from_dict(_v)) + for _k, _v in obj["attributes"].items() + ) + if obj.get("attributes") is not None + else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_idpo_auth_access_information.py b/zitadel_client/models/beta_user_service_idpo_auth_access_information.py new file mode 100644 index 00000000..ab03c1e9 --- /dev/null +++ b/zitadel_client/models/beta_user_service_idpo_auth_access_information.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceIDPOAuthAccessInformation(BaseModel): + """ + BetaUserServiceIDPOAuthAccessInformation + """ # noqa: E501 + access_token: Optional[StrictStr] = Field(default=None, alias="accessToken") + id_token: Optional[StrictStr] = Field(default=None, alias="idToken") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPOAuthAccessInformation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if id_token (nullable) is None + # and model_fields_set contains the field + if self.id_token is None and "id_token" in self.model_fields_set: + _dict['idToken'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPOAuthAccessInformation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accessToken": obj.get("accessToken"), + "idToken": obj.get("idToken") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_idpsaml_access_information.py b/zitadel_client/models/beta_user_service_idpsaml_access_information.py new file mode 100644 index 00000000..287cde68 --- /dev/null +++ b/zitadel_client/models/beta_user_service_idpsaml_access_information.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceIDPSAMLAccessInformation(BaseModel): + """ + BetaUserServiceIDPSAMLAccessInformation + """ # noqa: E501 + assertion: Optional[Union[StrictBytes, StrictStr]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPSAMLAccessInformation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPSAMLAccessInformation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assertion": obj.get("assertion") + }) + return _obj + + diff --git a/zitadel_client/models/identity_provider_service_protobuf_any.py b/zitadel_client/models/beta_user_service_in_user_emails_query.py similarity index 85% rename from zitadel_client/models/identity_provider_service_protobuf_any.py rename to zitadel_client/models/beta_user_service_in_user_emails_query.py index 82dbc75a..9b97e09c 100644 --- a/zitadel_client/models/identity_provider_service_protobuf_any.py +++ b/zitadel_client/models/beta_user_service_in_user_emails_query.py @@ -22,11 +22,11 @@ from typing import Optional, Set from typing_extensions import Self -class IdentityProviderServiceProtobufAny(BaseModel): +class BetaUserServiceInUserEmailsQuery(BaseModel): """ - IdentityProviderServiceProtobufAny + Query for users with email in list of emails. """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + user_emails: Optional[List[StrictStr]] = Field(default=None, alias="userEmails") model_config = ConfigDict( populate_by_name=True, @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of IdentityProviderServiceProtobufAny from a JSON string""" + """Create an instance of BetaUserServiceInUserEmailsQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of IdentityProviderServiceProtobufAny from a dict""" + """Create an instance of BetaUserServiceInUserEmailsQuery from a dict""" if obj is None: return None @@ -79,7 +79,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "userEmails": obj.get("userEmails") }) return _obj diff --git a/zitadel_client/models/feature_service_protobuf_any.py b/zitadel_client/models/beta_user_service_in_user_id_query.py similarity index 86% rename from zitadel_client/models/feature_service_protobuf_any.py rename to zitadel_client/models/beta_user_service_in_user_id_query.py index f154eec4..168bd0db 100644 --- a/zitadel_client/models/feature_service_protobuf_any.py +++ b/zitadel_client/models/beta_user_service_in_user_id_query.py @@ -22,11 +22,11 @@ from typing import Optional, Set from typing_extensions import Self -class FeatureServiceProtobufAny(BaseModel): +class BetaUserServiceInUserIDQuery(BaseModel): """ - FeatureServiceProtobufAny + Query for users with ID in list of IDs. """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + user_ids: Optional[List[StrictStr]] = Field(default=None, alias="userIds") model_config = ConfigDict( populate_by_name=True, @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FeatureServiceProtobufAny from a JSON string""" + """Create an instance of BetaUserServiceInUserIDQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FeatureServiceProtobufAny from a dict""" + """Create an instance of BetaUserServiceInUserIDQuery from a dict""" if obj is None: return None @@ -79,7 +79,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "userIds": obj.get("userIds") }) return _obj diff --git a/zitadel_client/models/beta_user_service_last_name_query.py b/zitadel_client/models/beta_user_service_last_name_query.py new file mode 100644 index 00000000..2602cf8b --- /dev/null +++ b/zitadel_client/models/beta_user_service_last_name_query.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceLastNameQuery(BaseModel): + """ + Query for users with a specific last name. + """ # noqa: E501 + last_name: StrictStr = Field(alias="lastName") + method: Optional[BetaUserServiceTextQueryMethod] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceLastNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceLastNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "lastName": obj.get("lastName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_ldap_credentials.py b/zitadel_client/models/beta_user_service_ldap_credentials.py new file mode 100644 index 00000000..de099f79 --- /dev/null +++ b/zitadel_client/models/beta_user_service_ldap_credentials.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceLDAPCredentials(BaseModel): + """ + BetaUserServiceLDAPCredentials + """ # noqa: E501 + username: Optional[StrictStr] = None + password: Optional[StrictStr] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceLDAPCredentials from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceLDAPCredentials from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_list_authentication_method_types_request.py b/zitadel_client/models/beta_user_service_list_authentication_method_types_request.py new file mode 100644 index 00000000..81847433 --- /dev/null +++ b/zitadel_client/models/beta_user_service_list_authentication_method_types_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceListAuthenticationMethodTypesRequest(BaseModel): + """ + BetaUserServiceListAuthenticationMethodTypesRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceListAuthenticationMethodTypesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceListAuthenticationMethodTypesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/organization_service_rpc_status.py b/zitadel_client/models/beta_user_service_list_authentication_method_types_response.py similarity index 69% rename from zitadel_client/models/organization_service_rpc_status.py rename to zitadel_client/models/beta_user_service_list_authentication_method_types_response.py index d1da0b9a..f4b1551b 100644 --- a/zitadel_client/models/organization_service_rpc_status.py +++ b/zitadel_client/models/beta_user_service_list_authentication_method_types_response.py @@ -17,19 +17,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.organization_service_protobuf_any import OrganizationServiceProtobufAny +from zitadel_client.models.beta_user_service_authentication_method_type import BetaUserServiceAuthenticationMethodType +from zitadel_client.models.beta_user_service_list_details import BetaUserServiceListDetails from typing import Optional, Set from typing_extensions import Self -class OrganizationServiceRpcStatus(BaseModel): +class BetaUserServiceListAuthenticationMethodTypesResponse(BaseModel): """ - OrganizationServiceRpcStatus + BetaUserServiceListAuthenticationMethodTypesResponse """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[OrganizationServiceProtobufAny]] = None + details: Optional[BetaUserServiceListDetails] = None + auth_method_types: Optional[List[BetaUserServiceAuthenticationMethodType]] = Field(default=None, alias="authMethodTypes") model_config = ConfigDict( populate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationServiceRpcStatus from a JSON string""" + """Create an instance of BetaUserServiceListAuthenticationMethodTypesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +70,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) - _items = [] + # override the default output from pydantic by calling `to_dict()` of details if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + _dict['details'] = self.details.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationServiceRpcStatus from a dict""" + """Create an instance of BetaUserServiceListAuthenticationMethodTypesResponse from a dict""" if obj is None: return None @@ -89,9 +85,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [OrganizationServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "details": BetaUserServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "authMethodTypes": obj.get("authMethodTypes") }) return _obj diff --git a/zitadel_client/models/beta_user_service_list_details.py b/zitadel_client/models/beta_user_service_list_details.py new file mode 100644 index 00000000..bef1f0bf --- /dev/null +++ b/zitadel_client/models/beta_user_service_list_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceListDetails(BaseModel): + """ + BetaUserServiceListDetails + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceListDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceListDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "processedSequence": obj.get("processedSequence"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_list_query.py b/zitadel_client/models/beta_user_service_list_query.py new file mode 100644 index 00000000..465f183c --- /dev/null +++ b/zitadel_client/models/beta_user_service_list_query.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceListQuery(BaseModel): + """ + BetaUserServiceListQuery + """ # noqa: E501 + offset: Optional[Any] = None + limit: Optional[StrictInt] = None + asc: Optional[StrictBool] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceListQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceListQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "offset": obj.get("offset"), + "limit": obj.get("limit"), + "asc": obj.get("asc") + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_rpc_status.py b/zitadel_client/models/beta_user_service_list_users_request.py similarity index 60% rename from zitadel_client/models/settings_service_rpc_status.py rename to zitadel_client/models/beta_user_service_list_users_request.py index 4c028548..bfe0e88d 100644 --- a/zitadel_client/models/settings_service_rpc_status.py +++ b/zitadel_client/models/beta_user_service_list_users_request.py @@ -17,19 +17,21 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.settings_service_protobuf_any import SettingsServiceProtobufAny +from zitadel_client.models.beta_user_service_list_query import BetaUserServiceListQuery +from zitadel_client.models.beta_user_service_search_query import BetaUserServiceSearchQuery +from zitadel_client.models.beta_user_service_user_field_name import BetaUserServiceUserFieldName from typing import Optional, Set from typing_extensions import Self -class SettingsServiceRpcStatus(BaseModel): +class BetaUserServiceListUsersRequest(BaseModel): """ - SettingsServiceRpcStatus + BetaUserServiceListUsersRequest """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[SettingsServiceProtobufAny]] = None + query: Optional[BetaUserServiceListQuery] = None + sorting_column: Optional[BetaUserServiceUserFieldName] = Field(default=None, alias="sortingColumn") + queries: Optional[List[BetaUserServiceSearchQuery]] = Field(default=None, description="criteria the client is looking for") model_config = ConfigDict( populate_by_name=True, @@ -49,7 +51,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SettingsServiceRpcStatus from a JSON string""" + """Create an instance of BetaUserServiceListUsersRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +72,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) + # override the default output from pydantic by calling `to_dict()` of query + if self.query: + _dict['query'] = self.query.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in queries (list) _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + if self.queries: + for _item_queries in self.queries: + if _item_queries: + _items.append(_item_queries.to_dict()) + _dict['queries'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SettingsServiceRpcStatus from a dict""" + """Create an instance of BetaUserServiceListUsersRequest from a dict""" if obj is None: return None @@ -89,9 +94,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [SettingsServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "query": BetaUserServiceListQuery.from_dict(obj["query"]) if obj.get("query") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "queries": [BetaUserServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_user_service_list_users_response.py b/zitadel_client/models/beta_user_service_list_users_response.py new file mode 100644 index 00000000..191e9b78 --- /dev/null +++ b/zitadel_client/models/beta_user_service_list_users_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_user_service_list_details import BetaUserServiceListDetails +from zitadel_client.models.beta_user_service_user import BetaUserServiceUser +from zitadel_client.models.beta_user_service_user_field_name import BetaUserServiceUserFieldName +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceListUsersResponse(BaseModel): + """ + BetaUserServiceListUsersResponse + """ # noqa: E501 + details: Optional[BetaUserServiceListDetails] = None + sorting_column: Optional[BetaUserServiceUserFieldName] = Field(default=None, alias="sortingColumn") + result: Optional[List[BetaUserServiceUser]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceListUsersResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in result (list) + _items = [] + if self.result: + for _item_result in self.result: + if _item_result: + _items.append(_item_result.to_dict()) + _dict['result'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceListUsersResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "result": [BetaUserServiceUser.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/organization_service_protobuf_any.py b/zitadel_client/models/beta_user_service_lock_user_request.py similarity index 86% rename from zitadel_client/models/organization_service_protobuf_any.py rename to zitadel_client/models/beta_user_service_lock_user_request.py index 6abfad4a..5cc2070a 100644 --- a/zitadel_client/models/organization_service_protobuf_any.py +++ b/zitadel_client/models/beta_user_service_lock_user_request.py @@ -18,15 +18,15 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self -class OrganizationServiceProtobufAny(BaseModel): +class BetaUserServiceLockUserRequest(BaseModel): """ - OrganizationServiceProtobufAny + BetaUserServiceLockUserRequest """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + user_id: StrictStr = Field(alias="userId") model_config = ConfigDict( populate_by_name=True, @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationServiceProtobufAny from a JSON string""" + """Create an instance of BetaUserServiceLockUserRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationServiceProtobufAny from a dict""" + """Create an instance of BetaUserServiceLockUserRequest from a dict""" if obj is None: return None @@ -79,7 +79,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "userId": obj.get("userId") }) return _obj diff --git a/zitadel_client/models/beta_user_service_lock_user_response.py b/zitadel_client/models/beta_user_service_lock_user_response.py new file mode 100644 index 00000000..d2120484 --- /dev/null +++ b/zitadel_client/models/beta_user_service_lock_user_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceLockUserResponse(BaseModel): + """ + BetaUserServiceLockUserResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceLockUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceLockUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_login_name_query.py b/zitadel_client/models/beta_user_service_login_name_query.py new file mode 100644 index 00000000..064411cd --- /dev/null +++ b/zitadel_client/models/beta_user_service_login_name_query.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceLoginNameQuery(BaseModel): + """ + Query for users with a specific state. + """ # noqa: E501 + login_name: StrictStr = Field(alias="loginName") + method: Optional[BetaUserServiceTextQueryMethod] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceLoginNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceLoginNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginName": obj.get("loginName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_machine_user.py b/zitadel_client/models/beta_user_service_machine_user.py new file mode 100644 index 00000000..475d7692 --- /dev/null +++ b/zitadel_client/models/beta_user_service_machine_user.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_access_token_type import BetaUserServiceAccessTokenType +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceMachineUser(BaseModel): + """ + BetaUserServiceMachineUser + """ # noqa: E501 + name: Optional[StrictStr] = None + description: Optional[StrictStr] = None + has_secret: Optional[StrictBool] = Field(default=None, alias="hasSecret") + access_token_type: Optional[BetaUserServiceAccessTokenType] = Field(default=None, alias="accessTokenType") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceMachineUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceMachineUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "hasSecret": obj.get("hasSecret"), + "accessTokenType": obj.get("accessTokenType") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_nick_name_query.py b/zitadel_client/models/beta_user_service_nick_name_query.py new file mode 100644 index 00000000..ead10caf --- /dev/null +++ b/zitadel_client/models/beta_user_service_nick_name_query.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceNickNameQuery(BaseModel): + """ + Query for users with a specific nickname. + """ # noqa: E501 + nick_name: StrictStr = Field(alias="nickName") + method: Optional[BetaUserServiceTextQueryMethod] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceNickNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceNickNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "nickName": obj.get("nickName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_not_query.py b/zitadel_client/models/beta_user_service_not_query.py new file mode 100644 index 00000000..315e2f69 --- /dev/null +++ b/zitadel_client/models/beta_user_service_not_query.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceNotQuery(BaseModel): + """ + Negate the sub-condition. + """ # noqa: E501 + query: Optional[BetaUserServiceSearchQuery] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceNotQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of query + if self.query: + _dict['query'] = self.query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceNotQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "query": BetaUserServiceSearchQuery.from_dict(obj["query"]) if obj.get("query") is not None else None + }) + return _obj + +from zitadel_client.models.beta_user_service_search_query import BetaUserServiceSearchQuery +# TODO: Rewrite to not use raise_errors +BetaUserServiceNotQuery.model_rebuild(raise_errors=False) + diff --git a/zitadel_client/models/beta_user_service_notification_type.py b/zitadel_client/models/beta_user_service_notification_type.py new file mode 100644 index 00000000..e6178977 --- /dev/null +++ b/zitadel_client/models/beta_user_service_notification_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceNotificationType(str, Enum): + """ + BetaUserServiceNotificationType + """ + + """ + allowed enum values + """ + NOTIFICATION_TYPE_UNSPECIFIED = 'NOTIFICATION_TYPE_Unspecified' + NOTIFICATION_TYPE_EMAIL = 'NOTIFICATION_TYPE_Email' + NOTIFICATION_TYPE_SMS = 'NOTIFICATION_TYPE_SMS' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceNotificationType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/action_service_rpc_status.py b/zitadel_client/models/beta_user_service_or_query.py similarity index 71% rename from zitadel_client/models/action_service_rpc_status.py rename to zitadel_client/models/beta_user_service_or_query.py index 06a47444..f8e48c5b 100644 --- a/zitadel_client/models/action_service_rpc_status.py +++ b/zitadel_client/models/beta_user_service_or_query.py @@ -17,19 +17,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_protobuf_any import ActionServiceProtobufAny from typing import Optional, Set from typing_extensions import Self -class ActionServiceRpcStatus(BaseModel): +class BetaUserServiceOrQuery(BaseModel): """ - ActionServiceRpcStatus + Connect multiple sub-condition with and OR operator. """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[ActionServiceProtobufAny]] = None + queries: Optional[List[BetaUserServiceSearchQuery]] = None model_config = ConfigDict( populate_by_name=True, @@ -49,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceRpcStatus from a JSON string""" + """Create an instance of BetaUserServiceOrQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +67,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) + # override the default output from pydantic by calling `to_dict()` of each item in queries (list) _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + if self.queries: + for _item_queries in self.queries: + if _item_queries: + _items.append(_item_queries.to_dict()) + _dict['queries'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceRpcStatus from a dict""" + """Create an instance of BetaUserServiceOrQuery from a dict""" if obj is None: return None @@ -89,10 +86,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [ActionServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "queries": [BetaUserServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None }) return _obj +from zitadel_client.models.beta_user_service_search_query import BetaUserServiceSearchQuery +# TODO: Rewrite to not use raise_errors +BetaUserServiceOrQuery.model_rebuild(raise_errors=False) diff --git a/zitadel_client/models/beta_user_service_organization.py b/zitadel_client/models/beta_user_service_organization.py new file mode 100644 index 00000000..e4539607 --- /dev/null +++ b/zitadel_client/models/beta_user_service_organization.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.org_domain import OrgDomain +from zitadel_client.models.org_id import OrgId +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICEORGANIZATION_ONE_OF_SCHEMAS = ["OrgDomain", "OrgId"] + +class BetaUserServiceOrganization(BaseModel): + """ + BetaUserServiceOrganization + """ + # data type: OrgDomain + oneof_schema_1_validator: Optional[OrgDomain] = None + # data type: OrgId + oneof_schema_2_validator: Optional[OrgId] = None + actual_instance: Optional[Union[OrgDomain, OrgId]] = None + one_of_schemas: Set[str] = { "OrgDomain", "OrgId" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceOrganization.model_construct() + error_messages = [] + match = 0 + # validate data type: OrgDomain + if not isinstance(v, OrgDomain): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrgDomain`") + else: + match += 1 + # validate data type: OrgId + if not isinstance(v, OrgId): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrgId`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceOrganization with oneOf schemas: OrgDomain, OrgId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceOrganization with oneOf schemas: OrgDomain, OrgId. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into OrgDomain + try: + instance.actual_instance = OrgDomain.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OrgId + try: + instance.actual_instance = OrgId.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceOrganization with oneOf schemas: OrgDomain, OrgId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceOrganization with oneOf schemas: OrgDomain, OrgId. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], OrgDomain, OrgId]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_organization_id_query.py b/zitadel_client/models/beta_user_service_organization_id_query.py new file mode 100644 index 00000000..e3d58c1c --- /dev/null +++ b/zitadel_client/models/beta_user_service_organization_id_query.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceOrganizationIdQuery(BaseModel): + """ + Query for users under a specific organization as resource owner. + """ # noqa: E501 + organization_id: StrictStr = Field(alias="organizationId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceOrganizationIdQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceOrganizationIdQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_passkey_authenticator.py b/zitadel_client/models/beta_user_service_passkey_authenticator.py new file mode 100644 index 00000000..7740f1df --- /dev/null +++ b/zitadel_client/models/beta_user_service_passkey_authenticator.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServicePasskeyAuthenticator(str, Enum): + """ + BetaUserServicePasskeyAuthenticator + """ + + """ + allowed enum values + """ + PASSKEY_AUTHENTICATOR_UNSPECIFIED = 'PASSKEY_AUTHENTICATOR_UNSPECIFIED' + PASSKEY_AUTHENTICATOR_PLATFORM = 'PASSKEY_AUTHENTICATOR_PLATFORM' + PASSKEY_AUTHENTICATOR_CROSS_PLATFORM = 'PASSKEY_AUTHENTICATOR_CROSS_PLATFORM' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServicePasskeyAuthenticator from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_passkey_registration_code.py b/zitadel_client/models/beta_user_service_passkey_registration_code.py new file mode 100644 index 00000000..70029238 --- /dev/null +++ b/zitadel_client/models/beta_user_service_passkey_registration_code.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServicePasskeyRegistrationCode(BaseModel): + """ + BetaUserServicePasskeyRegistrationCode + """ # noqa: E501 + id: StrictStr + code: StrictStr + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServicePasskeyRegistrationCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServicePasskeyRegistrationCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "code": obj.get("code") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_password.py b/zitadel_client/models/beta_user_service_password.py new file mode 100644 index 00000000..097974ff --- /dev/null +++ b/zitadel_client/models/beta_user_service_password.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServicePassword(BaseModel): + """ + BetaUserServicePassword + """ # noqa: E501 + password: StrictStr + change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServicePassword from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServicePassword from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": obj.get("password"), + "changeRequired": obj.get("changeRequired") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_password_reset_request.py b/zitadel_client/models/beta_user_service_password_reset_request.py new file mode 100644 index 00000000..2ed56cf1 --- /dev/null +++ b/zitadel_client/models/beta_user_service_password_reset_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.return_code12 import ReturnCode12 +from zitadel_client.models.send_link3 import SendLink3 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICEPASSWORDRESETREQUEST_ONE_OF_SCHEMAS = ["ReturnCode12", "SendLink3"] + +class BetaUserServicePasswordResetRequest(BaseModel): + """ + BetaUserServicePasswordResetRequest + """ + # data type: ReturnCode12 + oneof_schema_1_validator: Optional[ReturnCode12] = None + # data type: SendLink3 + oneof_schema_2_validator: Optional[SendLink3] = None + actual_instance: Optional[Union[ReturnCode12, SendLink3]] = None + one_of_schemas: Set[str] = { "ReturnCode12", "SendLink3" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServicePasswordResetRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: ReturnCode12 + if not isinstance(v, ReturnCode12): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode12`") + else: + match += 1 + # validate data type: SendLink3 + if not isinstance(v, SendLink3): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendLink3`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServicePasswordResetRequest with oneOf schemas: ReturnCode12, SendLink3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServicePasswordResetRequest with oneOf schemas: ReturnCode12, SendLink3. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ReturnCode12 + try: + instance.actual_instance = ReturnCode12.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendLink3 + try: + instance.actual_instance = SendLink3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServicePasswordResetRequest with oneOf schemas: ReturnCode12, SendLink3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServicePasswordResetRequest with oneOf schemas: ReturnCode12, SendLink3. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ReturnCode12, SendLink3]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_password_reset_response.py b/zitadel_client/models/beta_user_service_password_reset_response.py new file mode 100644 index 00000000..74dcf676 --- /dev/null +++ b/zitadel_client/models/beta_user_service_password_reset_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServicePasswordResetResponse(BaseModel): + """ + BetaUserServicePasswordResetResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + verification_code: Optional[StrictStr] = Field(default=None, description="in case the medium was set to return_code, the code will be returned", alias="verificationCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServicePasswordResetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServicePasswordResetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_phone_query.py b/zitadel_client/models/beta_user_service_phone_query.py new file mode 100644 index 00000000..3300bcee --- /dev/null +++ b/zitadel_client/models/beta_user_service_phone_query.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServicePhoneQuery(BaseModel): + """ + Query for users with a specific phone. + """ # noqa: E501 + number: StrictStr + method: Optional[BetaUserServiceTextQueryMethod] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServicePhoneQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServicePhoneQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "number": obj.get("number"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_reactivate_user_request.py b/zitadel_client/models/beta_user_service_reactivate_user_request.py new file mode 100644 index 00000000..c249119b --- /dev/null +++ b/zitadel_client/models/beta_user_service_reactivate_user_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceReactivateUserRequest(BaseModel): + """ + BetaUserServiceReactivateUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceReactivateUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceReactivateUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_reactivate_user_response.py b/zitadel_client/models/beta_user_service_reactivate_user_response.py new file mode 100644 index 00000000..b1b03e91 --- /dev/null +++ b/zitadel_client/models/beta_user_service_reactivate_user_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceReactivateUserResponse(BaseModel): + """ + BetaUserServiceReactivateUserResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceReactivateUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceReactivateUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/zitadelobjectv2_organization.py b/zitadel_client/models/beta_user_service_redirect_urls.py similarity index 81% rename from zitadel_client/models/zitadelobjectv2_organization.py rename to zitadel_client/models/beta_user_service_redirect_urls.py index aa0d7b48..90810828 100644 --- a/zitadel_client/models/zitadelobjectv2_organization.py +++ b/zitadel_client/models/beta_user_service_redirect_urls.py @@ -18,16 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class Zitadelobjectv2Organization(BaseModel): +class BetaUserServiceRedirectURLs(BaseModel): """ - Zitadelobjectv2Organization + BetaUserServiceRedirectURLs """ # noqa: E501 - org_id: Optional[StrictStr] = Field(default=None, alias="orgId") - org_domain: Optional[StrictStr] = Field(default=None, alias="orgDomain") + success_url: Optional[StrictStr] = Field(default=None, alias="successUrl") + failure_url: Optional[StrictStr] = Field(default=None, alias="failureUrl") model_config = ConfigDict( populate_by_name=True, @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Zitadelobjectv2Organization from a JSON string""" + """Create an instance of BetaUserServiceRedirectURLs from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Zitadelobjectv2Organization from a dict""" + """Create an instance of BetaUserServiceRedirectURLs from a dict""" if obj is None: return None @@ -80,8 +80,8 @@ 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") + "successUrl": obj.get("successUrl"), + "failureUrl": obj.get("failureUrl") }) return _obj diff --git a/zitadel_client/models/beta_user_service_register_passkey_request.py b/zitadel_client/models/beta_user_service_register_passkey_request.py new file mode 100644 index 00000000..b275453d --- /dev/null +++ b/zitadel_client/models/beta_user_service_register_passkey_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_passkey_authenticator import BetaUserServicePasskeyAuthenticator +from zitadel_client.models.beta_user_service_passkey_registration_code import BetaUserServicePasskeyRegistrationCode +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRegisterPasskeyRequest(BaseModel): + """ + BetaUserServiceRegisterPasskeyRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + code: Optional[BetaUserServicePasskeyRegistrationCode] = None + authenticator: Optional[BetaUserServicePasskeyAuthenticator] = None + domain: Optional[StrictStr] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterPasskeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of code + if self.code: + _dict['code'] = self.code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterPasskeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "code": BetaUserServicePasskeyRegistrationCode.from_dict(obj["code"]) if obj.get("code") is not None else None, + "authenticator": obj.get("authenticator"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_register_passkey_response.py b/zitadel_client/models/beta_user_service_register_passkey_response.py new file mode 100644 index 00000000..247b1f3f --- /dev/null +++ b/zitadel_client/models/beta_user_service_register_passkey_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from zitadel_client.models.beta_user_service_value import BetaUserServiceValue +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRegisterPasskeyResponse(BaseModel): + """ + BetaUserServiceRegisterPasskeyResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + passkey_id: Optional[StrictStr] = Field(default=None, alias="passkeyId") + public_key_credential_creation_options: Optional[Dict[str, Optional[BetaUserServiceValue]]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredentialCreationOptions") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterPasskeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in public_key_credential_creation_options (dict) + _field_dict = {} + if self.public_key_credential_creation_options: + for _key_public_key_credential_creation_options in self.public_key_credential_creation_options: + if self.public_key_credential_creation_options[_key_public_key_credential_creation_options]: + _field_dict[_key_public_key_credential_creation_options] = self.public_key_credential_creation_options[_key_public_key_credential_creation_options].to_dict() + _dict['publicKeyCredentialCreationOptions'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterPasskeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "passkeyId": obj.get("passkeyId"), + "publicKeyCredentialCreationOptions": dict( + (_k, BetaUserServiceValue.from_dict(_v)) + for _k, _v in obj["publicKeyCredentialCreationOptions"].items() + ) + if obj.get("publicKeyCredentialCreationOptions") is not None + else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_register_totp_request.py b/zitadel_client/models/beta_user_service_register_totp_request.py new file mode 100644 index 00000000..d49069e5 --- /dev/null +++ b/zitadel_client/models/beta_user_service_register_totp_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRegisterTOTPRequest(BaseModel): + """ + BetaUserServiceRegisterTOTPRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterTOTPRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterTOTPRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_register_totp_response.py b/zitadel_client/models/beta_user_service_register_totp_response.py new file mode 100644 index 00000000..5a972f7a --- /dev/null +++ b/zitadel_client/models/beta_user_service_register_totp_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRegisterTOTPResponse(BaseModel): + """ + BetaUserServiceRegisterTOTPResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + uri: Optional[StrictStr] = None + secret: Optional[StrictStr] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterTOTPResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterTOTPResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "uri": obj.get("uri"), + "secret": obj.get("secret") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_register_u2_f_request.py b/zitadel_client/models/beta_user_service_register_u2_f_request.py new file mode 100644 index 00000000..48d0e306 --- /dev/null +++ b/zitadel_client/models/beta_user_service_register_u2_f_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRegisterU2FRequest(BaseModel): + """ + BetaUserServiceRegisterU2FRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + domain: Optional[StrictStr] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterU2FRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterU2FRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_register_u2_f_response.py b/zitadel_client/models/beta_user_service_register_u2_f_response.py new file mode 100644 index 00000000..26c8edf7 --- /dev/null +++ b/zitadel_client/models/beta_user_service_register_u2_f_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from zitadel_client.models.beta_user_service_value import BetaUserServiceValue +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRegisterU2FResponse(BaseModel): + """ + BetaUserServiceRegisterU2FResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + u2f_id: Optional[StrictStr] = Field(default=None, alias="u2fId") + public_key_credential_creation_options: Optional[Dict[str, Optional[BetaUserServiceValue]]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredentialCreationOptions") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterU2FResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in public_key_credential_creation_options (dict) + _field_dict = {} + if self.public_key_credential_creation_options: + for _key_public_key_credential_creation_options in self.public_key_credential_creation_options: + if self.public_key_credential_creation_options[_key_public_key_credential_creation_options]: + _field_dict[_key_public_key_credential_creation_options] = self.public_key_credential_creation_options[_key_public_key_credential_creation_options].to_dict() + _dict['publicKeyCredentialCreationOptions'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterU2FResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "u2fId": obj.get("u2fId"), + "publicKeyCredentialCreationOptions": dict( + (_k, BetaUserServiceValue.from_dict(_v)) + for _k, _v in obj["publicKeyCredentialCreationOptions"].items() + ) + if obj.get("publicKeyCredentialCreationOptions") is not None + else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_otp_email_request.py b/zitadel_client/models/beta_user_service_remove_otp_email_request.py new file mode 100644 index 00000000..1eaa0760 --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_otp_email_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemoveOTPEmailRequest(BaseModel): + """ + BetaUserServiceRemoveOTPEmailRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPEmailRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPEmailRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_otp_email_response.py b/zitadel_client/models/beta_user_service_remove_otp_email_response.py new file mode 100644 index 00000000..b04fc5a2 --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_otp_email_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemoveOTPEmailResponse(BaseModel): + """ + BetaUserServiceRemoveOTPEmailResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPEmailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPEmailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_otpsms_request.py b/zitadel_client/models/beta_user_service_remove_otpsms_request.py new file mode 100644 index 00000000..2b5a0a34 --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_otpsms_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemoveOTPSMSRequest(BaseModel): + """ + BetaUserServiceRemoveOTPSMSRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPSMSRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPSMSRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_otpsms_response.py b/zitadel_client/models/beta_user_service_remove_otpsms_response.py new file mode 100644 index 00000000..d8f61e3a --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_otpsms_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemoveOTPSMSResponse(BaseModel): + """ + BetaUserServiceRemoveOTPSMSResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPSMSResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPSMSResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_phone_request.py b/zitadel_client/models/beta_user_service_remove_phone_request.py new file mode 100644 index 00000000..256d67f5 --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_phone_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemovePhoneRequest(BaseModel): + """ + BetaUserServiceRemovePhoneRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemovePhoneRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemovePhoneRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_phone_response.py b/zitadel_client/models/beta_user_service_remove_phone_response.py new file mode 100644 index 00000000..3b65c908 --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_phone_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemovePhoneResponse(BaseModel): + """ + BetaUserServiceRemovePhoneResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemovePhoneResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemovePhoneResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_totp_request.py b/zitadel_client/models/beta_user_service_remove_totp_request.py new file mode 100644 index 00000000..1cd4f7d7 --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_totp_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemoveTOTPRequest(BaseModel): + """ + BetaUserServiceRemoveTOTPRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveTOTPRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveTOTPRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_totp_response.py b/zitadel_client/models/beta_user_service_remove_totp_response.py new file mode 100644 index 00000000..5eb4ea78 --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_totp_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemoveTOTPResponse(BaseModel): + """ + BetaUserServiceRemoveTOTPResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveTOTPResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveTOTPResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_resend_email_code_request.py b/zitadel_client/models/beta_user_service_resend_email_code_request.py new file mode 100644 index 00000000..ad40c1e0 --- /dev/null +++ b/zitadel_client/models/beta_user_service_resend_email_code_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.return_code9 import ReturnCode9 +from zitadel_client.models.send_code7 import SendCode7 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICERESENDEMAILCODEREQUEST_ONE_OF_SCHEMAS = ["ReturnCode9", "SendCode7"] + +class BetaUserServiceResendEmailCodeRequest(BaseModel): + """ + BetaUserServiceResendEmailCodeRequest + """ + # data type: ReturnCode9 + oneof_schema_1_validator: Optional[ReturnCode9] = None + # data type: SendCode7 + oneof_schema_2_validator: Optional[SendCode7] = None + actual_instance: Optional[Union[ReturnCode9, SendCode7]] = None + one_of_schemas: Set[str] = { "ReturnCode9", "SendCode7" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceResendEmailCodeRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: ReturnCode9 + if not isinstance(v, ReturnCode9): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode9`") + else: + match += 1 + # validate data type: SendCode7 + if not isinstance(v, SendCode7): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode7`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceResendEmailCodeRequest with oneOf schemas: ReturnCode9, SendCode7. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceResendEmailCodeRequest with oneOf schemas: ReturnCode9, SendCode7. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ReturnCode9 + try: + instance.actual_instance = ReturnCode9.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode7 + try: + instance.actual_instance = SendCode7.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceResendEmailCodeRequest with oneOf schemas: ReturnCode9, SendCode7. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceResendEmailCodeRequest with oneOf schemas: ReturnCode9, SendCode7. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ReturnCode9, SendCode7]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_resend_email_code_response.py b/zitadel_client/models/beta_user_service_resend_email_code_response.py new file mode 100644 index 00000000..ee222bb0 --- /dev/null +++ b/zitadel_client/models/beta_user_service_resend_email_code_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceResendEmailCodeResponse(BaseModel): + """ + BetaUserServiceResendEmailCodeResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceResendEmailCodeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceResendEmailCodeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_resend_phone_code_request.py b/zitadel_client/models/beta_user_service_resend_phone_code_request.py new file mode 100644 index 00000000..ef52278a --- /dev/null +++ b/zitadel_client/models/beta_user_service_resend_phone_code_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.return_code10 import ReturnCode10 +from zitadel_client.models.send_code8 import SendCode8 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICERESENDPHONECODEREQUEST_ONE_OF_SCHEMAS = ["ReturnCode10", "SendCode8"] + +class BetaUserServiceResendPhoneCodeRequest(BaseModel): + """ + BetaUserServiceResendPhoneCodeRequest + """ + # data type: ReturnCode10 + oneof_schema_1_validator: Optional[ReturnCode10] = None + # data type: SendCode8 + oneof_schema_2_validator: Optional[SendCode8] = None + actual_instance: Optional[Union[ReturnCode10, SendCode8]] = None + one_of_schemas: Set[str] = { "ReturnCode10", "SendCode8" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceResendPhoneCodeRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: ReturnCode10 + if not isinstance(v, ReturnCode10): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode10`") + else: + match += 1 + # validate data type: SendCode8 + if not isinstance(v, SendCode8): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode8`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceResendPhoneCodeRequest with oneOf schemas: ReturnCode10, SendCode8. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceResendPhoneCodeRequest with oneOf schemas: ReturnCode10, SendCode8. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ReturnCode10 + try: + instance.actual_instance = ReturnCode10.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode8 + try: + instance.actual_instance = SendCode8.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceResendPhoneCodeRequest with oneOf schemas: ReturnCode10, SendCode8. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceResendPhoneCodeRequest with oneOf schemas: ReturnCode10, SendCode8. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ReturnCode10, SendCode8]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_resend_phone_code_response.py b/zitadel_client/models/beta_user_service_resend_phone_code_response.py new file mode 100644 index 00000000..ff85b600 --- /dev/null +++ b/zitadel_client/models/beta_user_service_resend_phone_code_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceResendPhoneCodeResponse(BaseModel): + """ + BetaUserServiceResendPhoneCodeResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceResendPhoneCodeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceResendPhoneCodeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_request.py b/zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_request.py new file mode 100644 index 00000000..ff984ffe --- /dev/null +++ b/zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRetrieveIdentityProviderIntentRequest(BaseModel): + """ + BetaUserServiceRetrieveIdentityProviderIntentRequest + """ # noqa: E501 + idp_intent_id: Optional[StrictStr] = Field(default=None, alias="idpIntentId") + idp_intent_token: Optional[StrictStr] = Field(default=None, alias="idpIntentToken") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRetrieveIdentityProviderIntentRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRetrieveIdentityProviderIntentRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idpIntentId": obj.get("idpIntentId"), + "idpIntentToken": obj.get("idpIntentToken") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_response.py b/zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_response.py new file mode 100644 index 00000000..e231eaa1 --- /dev/null +++ b/zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from zitadel_client.models.beta_user_service_idp_information import BetaUserServiceIDPInformation +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRetrieveIdentityProviderIntentResponse(BaseModel): + """ + BetaUserServiceRetrieveIdentityProviderIntentResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + idp_information: Optional[BetaUserServiceIDPInformation] = Field(default=None, alias="idpInformation") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRetrieveIdentityProviderIntentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of idp_information + if self.idp_information: + _dict['idpInformation'] = self.idp_information.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRetrieveIdentityProviderIntentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "idpInformation": BetaUserServiceIDPInformation.from_dict(obj["idpInformation"]) if obj.get("idpInformation") is not None else None, + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_search_query.py b/zitadel_client/models/beta_user_service_search_query.py new file mode 100644 index 00000000..2d3d5e40 --- /dev/null +++ b/zitadel_client/models/beta_user_service_search_query.py @@ -0,0 +1,335 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.display_name_query1 import DisplayNameQuery1 +from zitadel_client.models.email_query1 import EmailQuery1 +from zitadel_client.models.first_name_query1 import FirstNameQuery1 +from zitadel_client.models.in_user_emails_query1 import InUserEmailsQuery1 +from zitadel_client.models.in_user_ids_query1 import InUserIdsQuery1 +from zitadel_client.models.last_name_query1 import LastNameQuery1 +from zitadel_client.models.login_name_query1 import LoginNameQuery1 +from zitadel_client.models.nick_name_query1 import NickNameQuery1 +from zitadel_client.models.organization_id_query1 import OrganizationIdQuery1 +from zitadel_client.models.phone_query1 import PhoneQuery1 +from zitadel_client.models.state_query2 import StateQuery2 +from zitadel_client.models.type_query1 import TypeQuery1 +from zitadel_client.models.user_name_query1 import UserNameQuery1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICESEARCHQUERY_ONE_OF_SCHEMAS = ["AndQuery1", "DisplayNameQuery1", "EmailQuery1", "FirstNameQuery1", "InUserEmailsQuery1", "InUserIdsQuery1", "LastNameQuery1", "LoginNameQuery1", "NickNameQuery1", "NotQuery1", "OrQuery1", "OrganizationIdQuery1", "PhoneQuery1", "StateQuery2", "TypeQuery1", "UserNameQuery1"] + +class BetaUserServiceSearchQuery(BaseModel): + """ + BetaUserServiceSearchQuery + """ + # data type: AndQuery1 + oneof_schema_1_validator: Optional[AndQuery1] = None + # data type: DisplayNameQuery1 + oneof_schema_2_validator: Optional[DisplayNameQuery1] = None + # data type: EmailQuery1 + oneof_schema_3_validator: Optional[EmailQuery1] = None + # data type: FirstNameQuery1 + oneof_schema_4_validator: Optional[FirstNameQuery1] = None + # data type: InUserEmailsQuery1 + oneof_schema_5_validator: Optional[InUserEmailsQuery1] = None + # data type: InUserIdsQuery1 + oneof_schema_6_validator: Optional[InUserIdsQuery1] = None + # data type: LastNameQuery1 + oneof_schema_7_validator: Optional[LastNameQuery1] = None + # data type: LoginNameQuery1 + oneof_schema_8_validator: Optional[LoginNameQuery1] = None + # data type: NickNameQuery1 + oneof_schema_9_validator: Optional[NickNameQuery1] = None + # data type: NotQuery1 + oneof_schema_10_validator: Optional[NotQuery1] = None + # data type: OrQuery1 + oneof_schema_11_validator: Optional[OrQuery1] = None + # data type: OrganizationIdQuery1 + oneof_schema_12_validator: Optional[OrganizationIdQuery1] = None + # data type: PhoneQuery1 + oneof_schema_13_validator: Optional[PhoneQuery1] = None + # data type: StateQuery2 + oneof_schema_14_validator: Optional[StateQuery2] = None + # data type: TypeQuery1 + oneof_schema_15_validator: Optional[TypeQuery1] = None + # data type: UserNameQuery1 + oneof_schema_16_validator: Optional[UserNameQuery1] = None + actual_instance: Optional[Union[AndQuery1, DisplayNameQuery1, EmailQuery1, FirstNameQuery1, InUserEmailsQuery1, InUserIdsQuery1, LastNameQuery1, LoginNameQuery1, NickNameQuery1, NotQuery1, OrQuery1, OrganizationIdQuery1, PhoneQuery1, StateQuery2, TypeQuery1, UserNameQuery1]] = None + one_of_schemas: Set[str] = { "AndQuery1", "DisplayNameQuery1", "EmailQuery1", "FirstNameQuery1", "InUserEmailsQuery1", "InUserIdsQuery1", "LastNameQuery1", "LoginNameQuery1", "NickNameQuery1", "NotQuery1", "OrQuery1", "OrganizationIdQuery1", "PhoneQuery1", "StateQuery2", "TypeQuery1", "UserNameQuery1" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceSearchQuery.model_construct() + error_messages = [] + match = 0 + # validate data type: AndQuery1 + if not isinstance(v, AndQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `AndQuery1`") + else: + match += 1 + # validate data type: DisplayNameQuery1 + if not isinstance(v, DisplayNameQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `DisplayNameQuery1`") + else: + match += 1 + # validate data type: EmailQuery1 + if not isinstance(v, EmailQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `EmailQuery1`") + else: + match += 1 + # validate data type: FirstNameQuery1 + if not isinstance(v, FirstNameQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `FirstNameQuery1`") + else: + match += 1 + # validate data type: InUserEmailsQuery1 + if not isinstance(v, InUserEmailsQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `InUserEmailsQuery1`") + else: + match += 1 + # validate data type: InUserIdsQuery1 + if not isinstance(v, InUserIdsQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `InUserIdsQuery1`") + else: + match += 1 + # validate data type: LastNameQuery1 + if not isinstance(v, LastNameQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `LastNameQuery1`") + else: + match += 1 + # validate data type: LoginNameQuery1 + if not isinstance(v, LoginNameQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `LoginNameQuery1`") + else: + match += 1 + # validate data type: NickNameQuery1 + if not isinstance(v, NickNameQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `NickNameQuery1`") + else: + match += 1 + # validate data type: NotQuery1 + if not isinstance(v, NotQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `NotQuery1`") + else: + match += 1 + # validate data type: OrQuery1 + if not isinstance(v, OrQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrQuery1`") + else: + match += 1 + # validate data type: OrganizationIdQuery1 + if not isinstance(v, OrganizationIdQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrganizationIdQuery1`") + else: + match += 1 + # validate data type: PhoneQuery1 + if not isinstance(v, PhoneQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `PhoneQuery1`") + else: + match += 1 + # validate data type: StateQuery2 + if not isinstance(v, StateQuery2): + error_messages.append(f"Error! Input type `{type(v)}` is not `StateQuery2`") + else: + match += 1 + # validate data type: TypeQuery1 + if not isinstance(v, TypeQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `TypeQuery1`") + else: + match += 1 + # validate data type: UserNameQuery1 + if not isinstance(v, UserNameQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserNameQuery1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceSearchQuery with oneOf schemas: AndQuery1, DisplayNameQuery1, EmailQuery1, FirstNameQuery1, InUserEmailsQuery1, InUserIdsQuery1, LastNameQuery1, LoginNameQuery1, NickNameQuery1, NotQuery1, OrQuery1, OrganizationIdQuery1, PhoneQuery1, StateQuery2, TypeQuery1, UserNameQuery1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceSearchQuery with oneOf schemas: AndQuery1, DisplayNameQuery1, EmailQuery1, FirstNameQuery1, InUserEmailsQuery1, InUserIdsQuery1, LastNameQuery1, LoginNameQuery1, NickNameQuery1, NotQuery1, OrQuery1, OrganizationIdQuery1, PhoneQuery1, StateQuery2, TypeQuery1, UserNameQuery1. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into AndQuery1 + try: + instance.actual_instance = AndQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DisplayNameQuery1 + try: + instance.actual_instance = DisplayNameQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into EmailQuery1 + try: + instance.actual_instance = EmailQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FirstNameQuery1 + try: + instance.actual_instance = FirstNameQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into InUserEmailsQuery1 + try: + instance.actual_instance = InUserEmailsQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into InUserIdsQuery1 + try: + instance.actual_instance = InUserIdsQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LastNameQuery1 + try: + instance.actual_instance = LastNameQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LoginNameQuery1 + try: + instance.actual_instance = LoginNameQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into NickNameQuery1 + try: + instance.actual_instance = NickNameQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into NotQuery1 + try: + instance.actual_instance = NotQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OrQuery1 + try: + instance.actual_instance = OrQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OrganizationIdQuery1 + try: + instance.actual_instance = OrganizationIdQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PhoneQuery1 + try: + instance.actual_instance = PhoneQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into StateQuery2 + try: + instance.actual_instance = StateQuery2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TypeQuery1 + try: + instance.actual_instance = TypeQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserNameQuery1 + try: + instance.actual_instance = UserNameQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceSearchQuery with oneOf schemas: AndQuery1, DisplayNameQuery1, EmailQuery1, FirstNameQuery1, InUserEmailsQuery1, InUserIdsQuery1, LastNameQuery1, LoginNameQuery1, NickNameQuery1, NotQuery1, OrQuery1, OrganizationIdQuery1, PhoneQuery1, StateQuery2, TypeQuery1, UserNameQuery1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceSearchQuery with oneOf schemas: AndQuery1, DisplayNameQuery1, EmailQuery1, FirstNameQuery1, InUserEmailsQuery1, InUserIdsQuery1, LastNameQuery1, LoginNameQuery1, NickNameQuery1, NotQuery1, OrQuery1, OrganizationIdQuery1, PhoneQuery1, StateQuery2, TypeQuery1, UserNameQuery1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AndQuery1, DisplayNameQuery1, EmailQuery1, FirstNameQuery1, InUserEmailsQuery1, InUserIdsQuery1, LastNameQuery1, LoginNameQuery1, NickNameQuery1, NotQuery1, OrQuery1, OrganizationIdQuery1, PhoneQuery1, StateQuery2, TypeQuery1, UserNameQuery1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + +from zitadel_client.models.and_query1 import AndQuery1 +from zitadel_client.models.not_query1 import NotQuery1 +from zitadel_client.models.or_query1 import OrQuery1 +# TODO: Rewrite to not use raise_errors +BetaUserServiceSearchQuery.model_rebuild(raise_errors=False) + diff --git a/zitadel_client/models/beta_user_service_send_email_verification_code.py b/zitadel_client/models/beta_user_service_send_email_verification_code.py new file mode 100644 index 00000000..e3c0043a --- /dev/null +++ b/zitadel_client/models/beta_user_service_send_email_verification_code.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSendEmailVerificationCode(BaseModel): + """ + BetaUserServiceSendEmailVerificationCode + """ # noqa: E501 + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSendEmailVerificationCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSendEmailVerificationCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_send_passkey_registration_link.py b/zitadel_client/models/beta_user_service_send_passkey_registration_link.py new file mode 100644 index 00000000..47a8c2cc --- /dev/null +++ b/zitadel_client/models/beta_user_service_send_passkey_registration_link.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSendPasskeyRegistrationLink(BaseModel): + """ + BetaUserServiceSendPasskeyRegistrationLink + """ # noqa: E501 + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSendPasskeyRegistrationLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSendPasskeyRegistrationLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_send_password_reset_link.py b/zitadel_client/models/beta_user_service_send_password_reset_link.py new file mode 100644 index 00000000..7a47092a --- /dev/null +++ b/zitadel_client/models/beta_user_service_send_password_reset_link.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_notification_type import BetaUserServiceNotificationType +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSendPasswordResetLink(BaseModel): + """ + BetaUserServiceSendPasswordResetLink + """ # noqa: E501 + notification_type: Optional[BetaUserServiceNotificationType] = Field(default=None, alias="notificationType") + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSendPasswordResetLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSendPasswordResetLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "notificationType": obj.get("notificationType"), + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_set_email_request.py b/zitadel_client/models/beta_user_service_set_email_request.py new file mode 100644 index 00000000..dadbcf48 --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_email_request.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.is_verified import IsVerified +from zitadel_client.models.return_code9 import ReturnCode9 +from zitadel_client.models.send_code7 import SendCode7 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICESETEMAILREQUEST_ONE_OF_SCHEMAS = ["IsVerified", "ReturnCode9", "SendCode7"] + +class BetaUserServiceSetEmailRequest(BaseModel): + """ + BetaUserServiceSetEmailRequest + """ + # data type: IsVerified + oneof_schema_1_validator: Optional[IsVerified] = None + # data type: ReturnCode9 + oneof_schema_2_validator: Optional[ReturnCode9] = None + # data type: SendCode7 + oneof_schema_3_validator: Optional[SendCode7] = None + actual_instance: Optional[Union[IsVerified, ReturnCode9, SendCode7]] = None + one_of_schemas: Set[str] = { "IsVerified", "ReturnCode9", "SendCode7" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceSetEmailRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: IsVerified + if not isinstance(v, IsVerified): + error_messages.append(f"Error! Input type `{type(v)}` is not `IsVerified`") + else: + match += 1 + # validate data type: ReturnCode9 + if not isinstance(v, ReturnCode9): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode9`") + else: + match += 1 + # validate data type: SendCode7 + if not isinstance(v, SendCode7): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode7`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceSetEmailRequest with oneOf schemas: IsVerified, ReturnCode9, SendCode7. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceSetEmailRequest with oneOf schemas: IsVerified, ReturnCode9, SendCode7. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IsVerified + try: + instance.actual_instance = IsVerified.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ReturnCode9 + try: + instance.actual_instance = ReturnCode9.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode7 + try: + instance.actual_instance = SendCode7.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceSetEmailRequest with oneOf schemas: IsVerified, ReturnCode9, SendCode7. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceSetEmailRequest with oneOf schemas: IsVerified, ReturnCode9, SendCode7. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IsVerified, ReturnCode9, SendCode7]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/identity_provider_service_rpc_status.py b/zitadel_client/models/beta_user_service_set_email_response.py similarity index 66% rename from zitadel_client/models/identity_provider_service_rpc_status.py rename to zitadel_client/models/beta_user_service_set_email_response.py index 7791068f..1943a548 100644 --- a/zitadel_client/models/identity_provider_service_rpc_status.py +++ b/zitadel_client/models/beta_user_service_set_email_response.py @@ -17,19 +17,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.identity_provider_service_protobuf_any import IdentityProviderServiceProtobufAny +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails from typing import Optional, Set from typing_extensions import Self -class IdentityProviderServiceRpcStatus(BaseModel): +class BetaUserServiceSetEmailResponse(BaseModel): """ - IdentityProviderServiceRpcStatus + BetaUserServiceSetEmailResponse """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[IdentityProviderServiceProtobufAny]] = None + details: Optional[BetaUserServiceDetails] = None + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") model_config = ConfigDict( populate_by_name=True, @@ -49,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of IdentityProviderServiceRpcStatus from a JSON string""" + """Create an instance of BetaUserServiceSetEmailResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +69,19 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) - _items = [] + # override the default output from pydantic by calling `to_dict()` of details if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of IdentityProviderServiceRpcStatus from a dict""" + """Create an instance of BetaUserServiceSetEmailResponse from a dict""" if obj is None: return None @@ -89,9 +89,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [IdentityProviderServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "verificationCode": obj.get("verificationCode") }) return _obj diff --git a/zitadel_client/models/beta_user_service_set_human_email.py b/zitadel_client/models/beta_user_service_set_human_email.py new file mode 100644 index 00000000..cce8f8ba --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_human_email.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.is_verified import IsVerified +from zitadel_client.models.return_code9 import ReturnCode9 +from zitadel_client.models.send_code7 import SendCode7 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICESETHUMANEMAIL_ONE_OF_SCHEMAS = ["IsVerified", "ReturnCode9", "SendCode7"] + +class BetaUserServiceSetHumanEmail(BaseModel): + """ + BetaUserServiceSetHumanEmail + """ + # data type: IsVerified + oneof_schema_1_validator: Optional[IsVerified] = None + # data type: ReturnCode9 + oneof_schema_2_validator: Optional[ReturnCode9] = None + # data type: SendCode7 + oneof_schema_3_validator: Optional[SendCode7] = None + actual_instance: Optional[Union[IsVerified, ReturnCode9, SendCode7]] = None + one_of_schemas: Set[str] = { "IsVerified", "ReturnCode9", "SendCode7" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceSetHumanEmail.model_construct() + error_messages = [] + match = 0 + # validate data type: IsVerified + if not isinstance(v, IsVerified): + error_messages.append(f"Error! Input type `{type(v)}` is not `IsVerified`") + else: + match += 1 + # validate data type: ReturnCode9 + if not isinstance(v, ReturnCode9): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode9`") + else: + match += 1 + # validate data type: SendCode7 + if not isinstance(v, SendCode7): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode7`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode9, SendCode7. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode9, SendCode7. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IsVerified + try: + instance.actual_instance = IsVerified.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ReturnCode9 + try: + instance.actual_instance = ReturnCode9.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode7 + try: + instance.actual_instance = SendCode7.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode9, SendCode7. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode9, SendCode7. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IsVerified, ReturnCode9, SendCode7]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_set_human_phone.py b/zitadel_client/models/beta_user_service_set_human_phone.py new file mode 100644 index 00000000..2aec08a2 --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_human_phone.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.is_verified import IsVerified +from zitadel_client.models.return_code10 import ReturnCode10 +from zitadel_client.models.send_code8 import SendCode8 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICESETHUMANPHONE_ONE_OF_SCHEMAS = ["IsVerified", "ReturnCode10", "SendCode8"] + +class BetaUserServiceSetHumanPhone(BaseModel): + """ + BetaUserServiceSetHumanPhone + """ + # data type: IsVerified + oneof_schema_1_validator: Optional[IsVerified] = None + # data type: ReturnCode10 + oneof_schema_2_validator: Optional[ReturnCode10] = None + # data type: SendCode8 + oneof_schema_3_validator: Optional[SendCode8] = None + actual_instance: Optional[Union[IsVerified, ReturnCode10, SendCode8]] = None + one_of_schemas: Set[str] = { "IsVerified", "ReturnCode10", "SendCode8" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceSetHumanPhone.model_construct() + error_messages = [] + match = 0 + # validate data type: IsVerified + if not isinstance(v, IsVerified): + error_messages.append(f"Error! Input type `{type(v)}` is not `IsVerified`") + else: + match += 1 + # validate data type: ReturnCode10 + if not isinstance(v, ReturnCode10): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode10`") + else: + match += 1 + # validate data type: SendCode8 + if not isinstance(v, SendCode8): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode8`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode10, SendCode8. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode10, SendCode8. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IsVerified + try: + instance.actual_instance = IsVerified.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ReturnCode10 + try: + instance.actual_instance = ReturnCode10.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode8 + try: + instance.actual_instance = SendCode8.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode10, SendCode8. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode10, SendCode8. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IsVerified, ReturnCode10, SendCode8]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_set_human_profile.py b/zitadel_client/models/beta_user_service_set_human_profile.py new file mode 100644 index 00000000..cc8b4225 --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_human_profile.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_gender import BetaUserServiceGender +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetHumanProfile(BaseModel): + """ + BetaUserServiceSetHumanProfile + """ # noqa: E501 + given_name: StrictStr = Field(alias="givenName") + family_name: StrictStr = Field(alias="familyName") + nick_name: Optional[StrictStr] = Field(default=None, alias="nickName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + preferred_language: Optional[StrictStr] = Field(default=None, alias="preferredLanguage") + gender: Optional[BetaUserServiceGender] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetHumanProfile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict['nickName'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if preferred_language (nullable) is None + # and model_fields_set contains the field + if self.preferred_language is None and "preferred_language" in self.model_fields_set: + _dict['preferredLanguage'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetHumanProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "givenName": obj.get("givenName"), + "familyName": obj.get("familyName"), + "nickName": obj.get("nickName"), + "displayName": obj.get("displayName"), + "preferredLanguage": obj.get("preferredLanguage"), + "gender": obj.get("gender") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_set_metadata_entry.py b/zitadel_client/models/beta_user_service_set_metadata_entry.py new file mode 100644 index 00000000..012142d5 --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_metadata_entry.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetMetadataEntry(BaseModel): + """ + BetaUserServiceSetMetadataEntry + """ # noqa: E501 + key: StrictStr + value: Union[StrictBytes, StrictStr] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetMetadataEntry from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetMetadataEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "value": obj.get("value") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_set_password.py b/zitadel_client/models/beta_user_service_set_password.py new file mode 100644 index 00000000..1b207145 --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_password.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from zitadel_client.models.beta_user_service_hashed_password import BetaUserServiceHashedPassword +from zitadel_client.models.beta_user_service_password import BetaUserServicePassword +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetPassword(BaseModel): + """ + BetaUserServiceSetPassword + """ # noqa: E501 + hashed_password: BetaUserServiceHashedPassword = Field(alias="hashedPassword") + password: BetaUserServicePassword + current_password: StrictStr = Field(alias="currentPassword") + verification_code: StrictStr = Field(alias="verificationCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPassword from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of hashed_password + if self.hashed_password: + _dict['hashedPassword'] = self.hashed_password.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPassword from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hashedPassword": BetaUserServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None, + "password": BetaUserServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None, + "currentPassword": obj.get("currentPassword"), + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_set_password_request.py b/zitadel_client/models/beta_user_service_set_password_request.py new file mode 100644 index 00000000..a7768256 --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_password_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.current_password import CurrentPassword +from zitadel_client.models.verification_code import VerificationCode +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICESETPASSWORDREQUEST_ONE_OF_SCHEMAS = ["CurrentPassword", "VerificationCode"] + +class BetaUserServiceSetPasswordRequest(BaseModel): + """ + BetaUserServiceSetPasswordRequest + """ + # data type: CurrentPassword + oneof_schema_1_validator: Optional[CurrentPassword] = None + # data type: VerificationCode + oneof_schema_2_validator: Optional[VerificationCode] = None + actual_instance: Optional[Union[CurrentPassword, VerificationCode]] = None + one_of_schemas: Set[str] = { "CurrentPassword", "VerificationCode" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceSetPasswordRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: CurrentPassword + if not isinstance(v, CurrentPassword): + error_messages.append(f"Error! Input type `{type(v)}` is not `CurrentPassword`") + else: + match += 1 + # validate data type: VerificationCode + if not isinstance(v, VerificationCode): + error_messages.append(f"Error! Input type `{type(v)}` is not `VerificationCode`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceSetPasswordRequest with oneOf schemas: CurrentPassword, VerificationCode. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceSetPasswordRequest with oneOf schemas: CurrentPassword, VerificationCode. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into CurrentPassword + try: + instance.actual_instance = CurrentPassword.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into VerificationCode + try: + instance.actual_instance = VerificationCode.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceSetPasswordRequest with oneOf schemas: CurrentPassword, VerificationCode. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceSetPasswordRequest with oneOf schemas: CurrentPassword, VerificationCode. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CurrentPassword, VerificationCode]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_set_password_response.py b/zitadel_client/models/beta_user_service_set_password_response.py new file mode 100644 index 00000000..767c05fc --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_password_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetPasswordResponse(BaseModel): + """ + BetaUserServiceSetPasswordResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPasswordResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPasswordResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_set_phone_request.py b/zitadel_client/models/beta_user_service_set_phone_request.py new file mode 100644 index 00000000..5d631d38 --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_phone_request.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.is_verified import IsVerified +from zitadel_client.models.return_code10 import ReturnCode10 +from zitadel_client.models.send_code8 import SendCode8 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICESETPHONEREQUEST_ONE_OF_SCHEMAS = ["IsVerified", "ReturnCode10", "SendCode8"] + +class BetaUserServiceSetPhoneRequest(BaseModel): + """ + BetaUserServiceSetPhoneRequest + """ + # data type: IsVerified + oneof_schema_1_validator: Optional[IsVerified] = None + # data type: ReturnCode10 + oneof_schema_2_validator: Optional[ReturnCode10] = None + # data type: SendCode8 + oneof_schema_3_validator: Optional[SendCode8] = None + actual_instance: Optional[Union[IsVerified, ReturnCode10, SendCode8]] = None + one_of_schemas: Set[str] = { "IsVerified", "ReturnCode10", "SendCode8" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceSetPhoneRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: IsVerified + if not isinstance(v, IsVerified): + error_messages.append(f"Error! Input type `{type(v)}` is not `IsVerified`") + else: + match += 1 + # validate data type: ReturnCode10 + if not isinstance(v, ReturnCode10): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode10`") + else: + match += 1 + # validate data type: SendCode8 + if not isinstance(v, SendCode8): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode8`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceSetPhoneRequest with oneOf schemas: IsVerified, ReturnCode10, SendCode8. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceSetPhoneRequest with oneOf schemas: IsVerified, ReturnCode10, SendCode8. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IsVerified + try: + instance.actual_instance = IsVerified.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ReturnCode10 + try: + instance.actual_instance = ReturnCode10.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode8 + try: + instance.actual_instance = SendCode8.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceSetPhoneRequest with oneOf schemas: IsVerified, ReturnCode10, SendCode8. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceSetPhoneRequest with oneOf schemas: IsVerified, ReturnCode10, SendCode8. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IsVerified, ReturnCode10, SendCode8]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_set_phone_response.py b/zitadel_client/models/beta_user_service_set_phone_response.py new file mode 100644 index 00000000..4ec354f2 --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_phone_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetPhoneResponse(BaseModel): + """ + BetaUserServiceSetPhoneResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPhoneResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPhoneResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_start_identity_provider_intent_request.py b/zitadel_client/models/beta_user_service_start_identity_provider_intent_request.py new file mode 100644 index 00000000..85ff083e --- /dev/null +++ b/zitadel_client/models/beta_user_service_start_identity_provider_intent_request.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.ldap3 import Ldap3 +from zitadel_client.models.urls1 import Urls1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICESTARTIDENTITYPROVIDERINTENTREQUEST_ONE_OF_SCHEMAS = ["Ldap3", "Urls1"] + +class BetaUserServiceStartIdentityProviderIntentRequest(BaseModel): + """ + BetaUserServiceStartIdentityProviderIntentRequest + """ + # data type: Ldap3 + oneof_schema_1_validator: Optional[Ldap3] = None + # data type: Urls1 + oneof_schema_2_validator: Optional[Urls1] = None + actual_instance: Optional[Union[Ldap3, Urls1]] = None + one_of_schemas: Set[str] = { "Ldap3", "Urls1" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceStartIdentityProviderIntentRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: Ldap3 + if not isinstance(v, Ldap3): + error_messages.append(f"Error! Input type `{type(v)}` is not `Ldap3`") + else: + match += 1 + # validate data type: Urls1 + if not isinstance(v, Urls1): + error_messages.append(f"Error! Input type `{type(v)}` is not `Urls1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceStartIdentityProviderIntentRequest with oneOf schemas: Ldap3, Urls1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceStartIdentityProviderIntentRequest with oneOf schemas: Ldap3, Urls1. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Ldap3 + try: + instance.actual_instance = Ldap3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Urls1 + try: + instance.actual_instance = Urls1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceStartIdentityProviderIntentRequest with oneOf schemas: Ldap3, Urls1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceStartIdentityProviderIntentRequest with oneOf schemas: Ldap3, Urls1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Ldap3, Urls1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_start_identity_provider_intent_response.py b/zitadel_client/models/beta_user_service_start_identity_provider_intent_response.py new file mode 100644 index 00000000..cbb40287 --- /dev/null +++ b/zitadel_client/models/beta_user_service_start_identity_provider_intent_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.auth_url import AuthUrl +from zitadel_client.models.idp_intent1 import IdpIntent1 +from zitadel_client.models.post_form import PostForm +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICESTARTIDENTITYPROVIDERINTENTRESPONSE_ONE_OF_SCHEMAS = ["AuthUrl", "IdpIntent1", "PostForm"] + +class BetaUserServiceStartIdentityProviderIntentResponse(BaseModel): + """ + BetaUserServiceStartIdentityProviderIntentResponse + """ + # data type: AuthUrl + oneof_schema_1_validator: Optional[AuthUrl] = None + # data type: IdpIntent1 + oneof_schema_2_validator: Optional[IdpIntent1] = None + # data type: PostForm + oneof_schema_3_validator: Optional[PostForm] = None + actual_instance: Optional[Union[AuthUrl, IdpIntent1, PostForm]] = None + one_of_schemas: Set[str] = { "AuthUrl", "IdpIntent1", "PostForm" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceStartIdentityProviderIntentResponse.model_construct() + error_messages = [] + match = 0 + # validate data type: AuthUrl + if not isinstance(v, AuthUrl): + error_messages.append(f"Error! Input type `{type(v)}` is not `AuthUrl`") + else: + match += 1 + # validate data type: IdpIntent1 + if not isinstance(v, IdpIntent1): + error_messages.append(f"Error! Input type `{type(v)}` is not `IdpIntent1`") + else: + match += 1 + # validate data type: PostForm + if not isinstance(v, PostForm): + error_messages.append(f"Error! Input type `{type(v)}` is not `PostForm`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceStartIdentityProviderIntentResponse with oneOf schemas: AuthUrl, IdpIntent1, PostForm. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceStartIdentityProviderIntentResponse with oneOf schemas: AuthUrl, IdpIntent1, PostForm. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into AuthUrl + try: + instance.actual_instance = AuthUrl.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into IdpIntent1 + try: + instance.actual_instance = IdpIntent1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PostForm + try: + instance.actual_instance = PostForm.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceStartIdentityProviderIntentResponse with oneOf schemas: AuthUrl, IdpIntent1, PostForm. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceStartIdentityProviderIntentResponse with oneOf schemas: AuthUrl, IdpIntent1, PostForm. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AuthUrl, IdpIntent1, PostForm]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/session_service_protobuf_any.py b/zitadel_client/models/beta_user_service_state_query.py similarity index 82% rename from zitadel_client/models/session_service_protobuf_any.py rename to zitadel_client/models/beta_user_service_state_query.py index e62c32ef..430beaa6 100644 --- a/zitadel_client/models/session_service_protobuf_any.py +++ b/zitadel_client/models/beta_user_service_state_query.py @@ -17,16 +17,17 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict +from zitadel_client.models.beta_user_service_user_state import BetaUserServiceUserState from typing import Optional, Set from typing_extensions import Self -class SessionServiceProtobufAny(BaseModel): +class BetaUserServiceStateQuery(BaseModel): """ - SessionServiceProtobufAny + Query for users with a specific state. """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + state: BetaUserServiceUserState model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceProtobufAny from a JSON string""" + """Create an instance of BetaUserServiceStateQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceProtobufAny from a dict""" + """Create an instance of BetaUserServiceStateQuery from a dict""" if obj is None: return None @@ -79,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "state": obj.get("state") }) return _obj diff --git a/zitadel_client/models/beta_user_service_text_query_method.py b/zitadel_client/models/beta_user_service_text_query_method.py new file mode 100644 index 00000000..b8800590 --- /dev/null +++ b/zitadel_client/models/beta_user_service_text_query_method.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceTextQueryMethod(str, Enum): + """ + BetaUserServiceTextQueryMethod + """ + + """ + allowed enum values + """ + TEXT_QUERY_METHOD_EQUALS = 'TEXT_QUERY_METHOD_EQUALS' + TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE = 'TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE' + TEXT_QUERY_METHOD_STARTS_WITH = 'TEXT_QUERY_METHOD_STARTS_WITH' + TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE = 'TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE' + TEXT_QUERY_METHOD_CONTAINS = 'TEXT_QUERY_METHOD_CONTAINS' + TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE = 'TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE' + TEXT_QUERY_METHOD_ENDS_WITH = 'TEXT_QUERY_METHOD_ENDS_WITH' + TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE = 'TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceTextQueryMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_type.py b/zitadel_client/models/beta_user_service_type.py new file mode 100644 index 00000000..6e9da096 --- /dev/null +++ b/zitadel_client/models/beta_user_service_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceType(str, Enum): + """ + BetaUserServiceType + """ + + """ + allowed enum values + """ + TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED' + TYPE_HUMAN = 'TYPE_HUMAN' + TYPE_MACHINE = 'TYPE_MACHINE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_protobuf_any.py b/zitadel_client/models/beta_user_service_type_query.py similarity index 83% rename from zitadel_client/models/web_key_service_protobuf_any.py rename to zitadel_client/models/beta_user_service_type_query.py index ac83c98a..079a7e19 100644 --- a/zitadel_client/models/web_key_service_protobuf_any.py +++ b/zitadel_client/models/beta_user_service_type_query.py @@ -17,16 +17,17 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict +from zitadel_client.models.beta_user_service_type import BetaUserServiceType from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceProtobufAny(BaseModel): +class BetaUserServiceTypeQuery(BaseModel): """ - WebKeyServiceProtobufAny + Query for users with a specific type. """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + type: BetaUserServiceType model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceProtobufAny from a JSON string""" + """Create an instance of BetaUserServiceTypeQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceProtobufAny from a dict""" + """Create an instance of BetaUserServiceTypeQuery from a dict""" if obj is None: return None @@ -79,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "type": obj.get("type") }) return _obj diff --git a/zitadel_client/models/beta_user_service_unlock_user_request.py b/zitadel_client/models/beta_user_service_unlock_user_request.py new file mode 100644 index 00000000..1b128a4e --- /dev/null +++ b/zitadel_client/models/beta_user_service_unlock_user_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceUnlockUserRequest(BaseModel): + """ + BetaUserServiceUnlockUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceUnlockUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceUnlockUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_unlock_user_response.py b/zitadel_client/models/beta_user_service_unlock_user_response.py new file mode 100644 index 00000000..ffb15a49 --- /dev/null +++ b/zitadel_client/models/beta_user_service_unlock_user_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceUnlockUserResponse(BaseModel): + """ + BetaUserServiceUnlockUserResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceUnlockUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceUnlockUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_update_human_user_request.py b/zitadel_client/models/beta_user_service_update_human_user_request.py new file mode 100644 index 00000000..3f433ed8 --- /dev/null +++ b/zitadel_client/models/beta_user_service_update_human_user_request.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_set_human_email import BetaUserServiceSetHumanEmail +from zitadel_client.models.beta_user_service_set_human_phone import BetaUserServiceSetHumanPhone +from zitadel_client.models.beta_user_service_set_human_profile import BetaUserServiceSetHumanProfile +from zitadel_client.models.beta_user_service_set_password import BetaUserServiceSetPassword +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceUpdateHumanUserRequest(BaseModel): + """ + BetaUserServiceUpdateHumanUserRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + username: Optional[StrictStr] = None + profile: Optional[BetaUserServiceSetHumanProfile] = None + email: Optional[BetaUserServiceSetHumanEmail] = None + phone: Optional[BetaUserServiceSetHumanPhone] = None + password: Optional[BetaUserServiceSetPassword] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceUpdateHumanUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of profile + if self.profile: + _dict['profile'] = self.profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of email + if self.email: + _dict['email'] = self.email.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone + if self.phone: + _dict['phone'] = self.phone.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceUpdateHumanUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "username": obj.get("username"), + "profile": BetaUserServiceSetHumanProfile.from_dict(obj["profile"]) if obj.get("profile") is not None else None, + "email": BetaUserServiceSetHumanEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, + "phone": BetaUserServiceSetHumanPhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, + "password": BetaUserServiceSetPassword.from_dict(obj["password"]) if obj.get("password") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_update_human_user_response.py b/zitadel_client/models/beta_user_service_update_human_user_response.py new file mode 100644 index 00000000..7364a135 --- /dev/null +++ b/zitadel_client/models/beta_user_service_update_human_user_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceUpdateHumanUserResponse(BaseModel): + """ + BetaUserServiceUpdateHumanUserResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + email_code: Optional[StrictStr] = Field(default=None, alias="emailCode") + phone_code: Optional[StrictStr] = Field(default=None, alias="phoneCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceUpdateHumanUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceUpdateHumanUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "emailCode": obj.get("emailCode"), + "phoneCode": obj.get("phoneCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_user.py b/zitadel_client/models/beta_user_service_user.py new file mode 100644 index 00000000..939b47d6 --- /dev/null +++ b/zitadel_client/models/beta_user_service_user.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.human2 import Human2 +from zitadel_client.models.machine1 import Machine1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICEUSER_ONE_OF_SCHEMAS = ["Human2", "Machine1"] + +class BetaUserServiceUser(BaseModel): + """ + BetaUserServiceUser + """ + # data type: Human2 + oneof_schema_1_validator: Optional[Human2] = None + # data type: Machine1 + oneof_schema_2_validator: Optional[Machine1] = None + actual_instance: Optional[Union[Human2, Machine1]] = None + one_of_schemas: Set[str] = { "Human2", "Machine1" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaUserServiceUser.model_construct() + error_messages = [] + match = 0 + # validate data type: Human2 + if not isinstance(v, Human2): + error_messages.append(f"Error! Input type `{type(v)}` is not `Human2`") + else: + match += 1 + # validate data type: Machine1 + if not isinstance(v, Machine1): + error_messages.append(f"Error! Input type `{type(v)}` is not `Machine1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceUser with oneOf schemas: Human2, Machine1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceUser with oneOf schemas: Human2, Machine1. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Human2 + try: + instance.actual_instance = Human2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Machine1 + try: + instance.actual_instance = Machine1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceUser with oneOf schemas: Human2, Machine1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceUser with oneOf schemas: Human2, Machine1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Human2, Machine1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_user_field_name.py b/zitadel_client/models/beta_user_service_user_field_name.py new file mode 100644 index 00000000..13dd0fa1 --- /dev/null +++ b/zitadel_client/models/beta_user_service_user_field_name.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceUserFieldName(str, Enum): + """ + BetaUserServiceUserFieldName + """ + + """ + allowed enum values + """ + USER_FIELD_NAME_UNSPECIFIED = 'USER_FIELD_NAME_UNSPECIFIED' + USER_FIELD_NAME_USER_NAME = 'USER_FIELD_NAME_USER_NAME' + USER_FIELD_NAME_FIRST_NAME = 'USER_FIELD_NAME_FIRST_NAME' + USER_FIELD_NAME_LAST_NAME = 'USER_FIELD_NAME_LAST_NAME' + USER_FIELD_NAME_NICK_NAME = 'USER_FIELD_NAME_NICK_NAME' + USER_FIELD_NAME_DISPLAY_NAME = 'USER_FIELD_NAME_DISPLAY_NAME' + USER_FIELD_NAME_EMAIL = 'USER_FIELD_NAME_EMAIL' + USER_FIELD_NAME_STATE = 'USER_FIELD_NAME_STATE' + USER_FIELD_NAME_TYPE = 'USER_FIELD_NAME_TYPE' + USER_FIELD_NAME_CREATION_DATE = 'USER_FIELD_NAME_CREATION_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceUserFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_user_name_query.py b/zitadel_client/models/beta_user_service_user_name_query.py new file mode 100644 index 00000000..489c855e --- /dev/null +++ b/zitadel_client/models/beta_user_service_user_name_query.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceUserNameQuery(BaseModel): + """ + Query for users with a specific user name. + """ # noqa: E501 + user_name: StrictStr = Field(alias="userName") + method: Optional[BetaUserServiceTextQueryMethod] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceUserNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceUserNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userName": obj.get("userName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_user_state.py b/zitadel_client/models/beta_user_service_user_state.py new file mode 100644 index 00000000..f18a7228 --- /dev/null +++ b/zitadel_client/models/beta_user_service_user_state.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceUserState(str, Enum): + """ + BetaUserServiceUserState + """ + + """ + allowed enum values + """ + USER_STATE_UNSPECIFIED = 'USER_STATE_UNSPECIFIED' + USER_STATE_ACTIVE = 'USER_STATE_ACTIVE' + USER_STATE_INACTIVE = 'USER_STATE_INACTIVE' + USER_STATE_DELETED = 'USER_STATE_DELETED' + USER_STATE_LOCKED = 'USER_STATE_LOCKED' + USER_STATE_INITIAL = 'USER_STATE_INITIAL' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceUserState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_value.py b/zitadel_client/models/beta_user_service_value.py new file mode 100644 index 00000000..4f7f192e --- /dev/null +++ b/zitadel_client/models/beta_user_service_value.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator +from typing import Any, Dict, List, Optional, Union +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAUSERSERVICEVALUE_ONE_OF_SCHEMAS = ["Dict[str, object]", "List[str]", "bool", "float", "str"] + +class BetaUserServiceValue(BaseModel): + """ + `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value. + """ + # data type: float + oneof_schema_1_validator: Optional[Union[StrictFloat, StrictInt]] = None + # data type: str + oneof_schema_2_validator: Optional[StrictStr] = None + # data type: bool + oneof_schema_3_validator: Optional[StrictBool] = None + # data type: List[str] + oneof_schema_4_validator: Optional[List[StrictStr]] = None + # data type: Dict[str, object] + oneof_schema_5_validator: Optional[Dict[str, Any]] = None + actual_instance: Optional[Union[Dict[str, object], List[str], bool, float, str]] = None + one_of_schemas: Set[str] = { "Dict[str, object]", "List[str]", "bool", "float", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = BetaUserServiceValue.model_construct() + error_messages = [] + match = 0 + # validate data type: float + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: str + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: bool + try: + instance.oneof_schema_3_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: List[str] + try: + instance.oneof_schema_4_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: Dict[str, object] + try: + instance.oneof_schema_5_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaUserServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaUserServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into float + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into str + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into bool + try: + # validation + instance.oneof_schema_3_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_3_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[str] + try: + # validation + instance.oneof_schema_4_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_4_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Dict[str, object] + try: + # validation + instance.oneof_schema_5_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_5_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaUserServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaUserServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Dict[str, object], List[str], bool, float, str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_user_service_verify_email_request.py b/zitadel_client/models/beta_user_service_verify_email_request.py new file mode 100644 index 00000000..fdf96c15 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_email_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyEmailRequest(BaseModel): + """ + BetaUserServiceVerifyEmailRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + verification_code: StrictStr = Field(alias="verificationCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyEmailRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyEmailRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_email_response.py b/zitadel_client/models/beta_user_service_verify_email_response.py new file mode 100644 index 00000000..2e6b5723 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_email_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyEmailResponse(BaseModel): + """ + BetaUserServiceVerifyEmailResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyEmailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyEmailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_passkey_registration_request.py b/zitadel_client/models/beta_user_service_verify_passkey_registration_request.py new file mode 100644 index 00000000..6ec6d0b2 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_passkey_registration_request.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_value import BetaUserServiceValue +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyPasskeyRegistrationRequest(BaseModel): + """ + BetaUserServiceVerifyPasskeyRegistrationRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + passkey_id: StrictStr = Field(alias="passkeyId") + public_key_credential: Dict[str, Optional[BetaUserServiceValue]] = Field(description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredential") + passkey_name: StrictStr = Field(alias="passkeyName") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPasskeyRegistrationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each value in public_key_credential (dict) + _field_dict = {} + if self.public_key_credential: + for _key_public_key_credential in self.public_key_credential: + if self.public_key_credential[_key_public_key_credential]: + _field_dict[_key_public_key_credential] = self.public_key_credential[_key_public_key_credential].to_dict() + _dict['publicKeyCredential'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPasskeyRegistrationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "passkeyId": obj.get("passkeyId"), + "publicKeyCredential": dict( + (_k, BetaUserServiceValue.from_dict(_v)) + for _k, _v in obj["publicKeyCredential"].items() + ) + if obj.get("publicKeyCredential") is not None + else None, + "passkeyName": obj.get("passkeyName") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_passkey_registration_response.py b/zitadel_client/models/beta_user_service_verify_passkey_registration_response.py new file mode 100644 index 00000000..fc994254 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_passkey_registration_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyPasskeyRegistrationResponse(BaseModel): + """ + BetaUserServiceVerifyPasskeyRegistrationResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPasskeyRegistrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPasskeyRegistrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_phone_request.py b/zitadel_client/models/beta_user_service_verify_phone_request.py new file mode 100644 index 00000000..a9421b1d --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_phone_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyPhoneRequest(BaseModel): + """ + BetaUserServiceVerifyPhoneRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + verification_code: StrictStr = Field(alias="verificationCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPhoneRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPhoneRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_phone_response.py b/zitadel_client/models/beta_user_service_verify_phone_response.py new file mode 100644 index 00000000..06c5e9f5 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_phone_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyPhoneResponse(BaseModel): + """ + BetaUserServiceVerifyPhoneResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPhoneResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPhoneResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_totp_registration_request.py b/zitadel_client/models/beta_user_service_verify_totp_registration_request.py new file mode 100644 index 00000000..ab8f5e63 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_totp_registration_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyTOTPRegistrationRequest(BaseModel): + """ + BetaUserServiceVerifyTOTPRegistrationRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + code: StrictStr + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyTOTPRegistrationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyTOTPRegistrationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "code": obj.get("code") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_totp_registration_response.py b/zitadel_client/models/beta_user_service_verify_totp_registration_response.py new file mode 100644 index 00000000..ddddb5c7 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_totp_registration_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyTOTPRegistrationResponse(BaseModel): + """ + BetaUserServiceVerifyTOTPRegistrationResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyTOTPRegistrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyTOTPRegistrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_u2_f_registration_request.py b/zitadel_client/models/beta_user_service_verify_u2_f_registration_request.py new file mode 100644 index 00000000..a6fd07c6 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_u2_f_registration_request.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_value import BetaUserServiceValue +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyU2FRegistrationRequest(BaseModel): + """ + BetaUserServiceVerifyU2FRegistrationRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + u2f_id: StrictStr = Field(alias="u2fId") + public_key_credential: Dict[str, Optional[BetaUserServiceValue]] = Field(description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredential") + token_name: StrictStr = Field(alias="tokenName") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyU2FRegistrationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each value in public_key_credential (dict) + _field_dict = {} + if self.public_key_credential: + for _key_public_key_credential in self.public_key_credential: + if self.public_key_credential[_key_public_key_credential]: + _field_dict[_key_public_key_credential] = self.public_key_credential[_key_public_key_credential].to_dict() + _dict['publicKeyCredential'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyU2FRegistrationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "u2fId": obj.get("u2fId"), + "publicKeyCredential": dict( + (_k, BetaUserServiceValue.from_dict(_v)) + for _k, _v in obj["publicKeyCredential"].items() + ) + if obj.get("publicKeyCredential") is not None + else None, + "tokenName": obj.get("tokenName") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_u2_f_registration_response.py b/zitadel_client/models/beta_user_service_verify_u2_f_registration_response.py new file mode 100644 index 00000000..098413ea --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_u2_f_registration_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyU2FRegistrationResponse(BaseModel): + """ + BetaUserServiceVerifyU2FRegistrationResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyU2FRegistrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyU2FRegistrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_activate_web_key_request.py b/zitadel_client/models/beta_web_key_service_activate_web_key_request.py new file mode 100644 index 00000000..03f3894d --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_activate_web_key_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceActivateWebKeyRequest(BaseModel): + """ + BetaWebKeyServiceActivateWebKeyRequest + """ # noqa: E501 + id: StrictStr + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceActivateWebKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceActivateWebKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_activate_web_key_response.py b/zitadel_client/models/beta_web_key_service_activate_web_key_response.py new file mode 100644 index 00000000..c94478f9 --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_activate_web_key_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceActivateWebKeyResponse(BaseModel): + """ + BetaWebKeyServiceActivateWebKeyResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceActivateWebKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceActivateWebKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_any.py b/zitadel_client/models/beta_web_key_service_any.py new file mode 100644 index 00000000..1893d062 --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_connect_error.py b/zitadel_client/models/beta_web_key_service_connect_error.py new file mode 100644 index 00000000..cd73d83a --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_web_key_service_any import BetaWebKeyServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaWebKeyServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaWebKeyServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_create_web_key_request.py b/zitadel_client/models/beta_web_key_service_create_web_key_request.py new file mode 100644 index 00000000..c178ed0c --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_create_web_key_request.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.ecdsa import Ecdsa +from zitadel_client.models.ed25519 import Ed25519 +from zitadel_client.models.rsa import Rsa +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAWEBKEYSERVICECREATEWEBKEYREQUEST_ONE_OF_SCHEMAS = ["Ecdsa", "Ed25519", "Rsa"] + +class BetaWebKeyServiceCreateWebKeyRequest(BaseModel): + """ + BetaWebKeyServiceCreateWebKeyRequest + """ + # data type: Ecdsa + oneof_schema_1_validator: Optional[Ecdsa] = None + # data type: Ed25519 + oneof_schema_2_validator: Optional[Ed25519] = None + # data type: Rsa + oneof_schema_3_validator: Optional[Rsa] = None + actual_instance: Optional[Union[Ecdsa, Ed25519, Rsa]] = None + one_of_schemas: Set[str] = { "Ecdsa", "Ed25519", "Rsa" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaWebKeyServiceCreateWebKeyRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: Ecdsa + if not isinstance(v, Ecdsa): + error_messages.append(f"Error! Input type `{type(v)}` is not `Ecdsa`") + else: + match += 1 + # validate data type: Ed25519 + if not isinstance(v, Ed25519): + error_messages.append(f"Error! Input type `{type(v)}` is not `Ed25519`") + else: + match += 1 + # validate data type: Rsa + if not isinstance(v, Rsa): + error_messages.append(f"Error! Input type `{type(v)}` is not `Rsa`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaWebKeyServiceCreateWebKeyRequest with oneOf schemas: Ecdsa, Ed25519, Rsa. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaWebKeyServiceCreateWebKeyRequest with oneOf schemas: Ecdsa, Ed25519, Rsa. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Ecdsa + try: + instance.actual_instance = Ecdsa.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Ed25519 + try: + instance.actual_instance = Ed25519.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Rsa + try: + instance.actual_instance = Rsa.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaWebKeyServiceCreateWebKeyRequest with oneOf schemas: Ecdsa, Ed25519, Rsa. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaWebKeyServiceCreateWebKeyRequest with oneOf schemas: Ecdsa, Ed25519, Rsa. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Ecdsa, Ed25519, Rsa]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/beta_web_key_service_create_web_key_response.py b/zitadel_client/models/beta_web_key_service_create_web_key_response.py new file mode 100644 index 00000000..4decead2 --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_create_web_key_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceCreateWebKeyResponse(BaseModel): + """ + BetaWebKeyServiceCreateWebKeyResponse + """ # 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="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceCreateWebKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceCreateWebKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_delete_web_key_request.py b/zitadel_client/models/beta_web_key_service_delete_web_key_request.py new file mode 100644 index 00000000..e54f85e3 --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_delete_web_key_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceDeleteWebKeyRequest(BaseModel): + """ + BetaWebKeyServiceDeleteWebKeyRequest + """ # noqa: E501 + id: StrictStr + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceDeleteWebKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceDeleteWebKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_delete_web_key_response.py b/zitadel_client/models/beta_web_key_service_delete_web_key_response.py new file mode 100644 index 00000000..ea5e4943 --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_delete_web_key_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceDeleteWebKeyResponse(BaseModel): + """ + BetaWebKeyServiceDeleteWebKeyResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceDeleteWebKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceDeleteWebKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_ecdsa.py b/zitadel_client/models/beta_web_key_service_ecdsa.py new file mode 100644 index 00000000..5e4aea23 --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_ecdsa.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_web_key_service_ecdsa_curve import BetaWebKeyServiceECDSACurve +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceECDSA(BaseModel): + """ + BetaWebKeyServiceECDSA + """ # noqa: E501 + curve: Optional[BetaWebKeyServiceECDSACurve] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceECDSA from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceECDSA from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "curve": obj.get("curve") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_ecdsa_curve.py b/zitadel_client/models/beta_web_key_service_ecdsa_curve.py similarity index 86% rename from zitadel_client/models/web_key_service_beta_ecdsa_curve.py rename to zitadel_client/models/beta_web_key_service_ecdsa_curve.py index e4fd1855..b50166ec 100644 --- a/zitadel_client/models/web_key_service_beta_ecdsa_curve.py +++ b/zitadel_client/models/beta_web_key_service_ecdsa_curve.py @@ -18,9 +18,9 @@ from typing_extensions import Self -class WebKeyServiceBetaECDSACurve(str, Enum): +class BetaWebKeyServiceECDSACurve(str, Enum): """ - WebKeyServiceBetaECDSACurve + BetaWebKeyServiceECDSACurve """ """ @@ -33,7 +33,7 @@ class WebKeyServiceBetaECDSACurve(str, Enum): @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of WebKeyServiceBetaECDSACurve from a JSON string""" + """Create an instance of BetaWebKeyServiceECDSACurve from a JSON string""" return cls(json.loads(json_str)) diff --git a/zitadel_client/models/web_key_service_beta_list_web_keys_response.py b/zitadel_client/models/beta_web_key_service_list_web_keys_response.py similarity index 86% rename from zitadel_client/models/web_key_service_beta_list_web_keys_response.py rename to zitadel_client/models/beta_web_key_service_list_web_keys_response.py index ac899644..6c4624b9 100644 --- a/zitadel_client/models/web_key_service_beta_list_web_keys_response.py +++ b/zitadel_client/models/beta_web_key_service_list_web_keys_response.py @@ -19,15 +19,15 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.web_key_service_beta_web_key import WebKeyServiceBetaWebKey +from zitadel_client.models.beta_web_key_service_web_key import BetaWebKeyServiceWebKey from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceBetaListWebKeysResponse(BaseModel): +class BetaWebKeyServiceListWebKeysResponse(BaseModel): """ - WebKeyServiceBetaListWebKeysResponse + BetaWebKeyServiceListWebKeysResponse """ # noqa: E501 - web_keys: Optional[List[WebKeyServiceBetaWebKey]] = Field(default=None, alias="webKeys") + web_keys: Optional[List[BetaWebKeyServiceWebKey]] = Field(default=None, alias="webKeys") model_config = ConfigDict( populate_by_name=True, @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaListWebKeysResponse from a JSON string""" + """Create an instance of BetaWebKeyServiceListWebKeysResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -79,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaListWebKeysResponse from a dict""" + """Create an instance of BetaWebKeyServiceListWebKeysResponse from a dict""" if obj is None: return None @@ -87,7 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "webKeys": [WebKeyServiceBetaWebKey.from_dict(_item) for _item in obj["webKeys"]] if obj.get("webKeys") is not None else None + "webKeys": [BetaWebKeyServiceWebKey.from_dict(_item) for _item in obj["webKeys"]] if obj.get("webKeys") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_web_key_service_rsa.py b/zitadel_client/models/beta_web_key_service_rsa.py new file mode 100644 index 00000000..155bb1e5 --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_rsa.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_web_key_service_rsa_bits import BetaWebKeyServiceRSABits +from zitadel_client.models.beta_web_key_service_rsa_hasher import BetaWebKeyServiceRSAHasher +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceRSA(BaseModel): + """ + BetaWebKeyServiceRSA + """ # noqa: E501 + bits: Optional[BetaWebKeyServiceRSABits] = None + hasher: Optional[BetaWebKeyServiceRSAHasher] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceRSA from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceRSA from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bits": obj.get("bits"), + "hasher": obj.get("hasher") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_rsa_bits.py b/zitadel_client/models/beta_web_key_service_rsa_bits.py similarity index 86% rename from zitadel_client/models/web_key_service_beta_rsa_bits.py rename to zitadel_client/models/beta_web_key_service_rsa_bits.py index d986bfb5..886e699f 100644 --- a/zitadel_client/models/web_key_service_beta_rsa_bits.py +++ b/zitadel_client/models/beta_web_key_service_rsa_bits.py @@ -18,9 +18,9 @@ from typing_extensions import Self -class WebKeyServiceBetaRSABits(str, Enum): +class BetaWebKeyServiceRSABits(str, Enum): """ - WebKeyServiceBetaRSABits + BetaWebKeyServiceRSABits """ """ @@ -33,7 +33,7 @@ class WebKeyServiceBetaRSABits(str, Enum): @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of WebKeyServiceBetaRSABits from a JSON string""" + """Create an instance of BetaWebKeyServiceRSABits from a JSON string""" return cls(json.loads(json_str)) diff --git a/zitadel_client/models/web_key_service_beta_rsa_hasher.py b/zitadel_client/models/beta_web_key_service_rsa_hasher.py similarity index 86% rename from zitadel_client/models/web_key_service_beta_rsa_hasher.py rename to zitadel_client/models/beta_web_key_service_rsa_hasher.py index a466300b..8aa9e1a5 100644 --- a/zitadel_client/models/web_key_service_beta_rsa_hasher.py +++ b/zitadel_client/models/beta_web_key_service_rsa_hasher.py @@ -18,9 +18,9 @@ from typing_extensions import Self -class WebKeyServiceBetaRSAHasher(str, Enum): +class BetaWebKeyServiceRSAHasher(str, Enum): """ - WebKeyServiceBetaRSAHasher + BetaWebKeyServiceRSAHasher """ """ @@ -33,7 +33,7 @@ class WebKeyServiceBetaRSAHasher(str, Enum): @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of WebKeyServiceBetaRSAHasher from a JSON string""" + """Create an instance of BetaWebKeyServiceRSAHasher from a JSON string""" return cls(json.loads(json_str)) diff --git a/zitadel_client/models/web_key_service_beta_state.py b/zitadel_client/models/beta_web_key_service_state.py similarity index 62% rename from zitadel_client/models/web_key_service_beta_state.py rename to zitadel_client/models/beta_web_key_service_state.py index 1d027f29..26f35960 100644 --- a/zitadel_client/models/web_key_service_beta_state.py +++ b/zitadel_client/models/beta_web_key_service_state.py @@ -18,9 +18,9 @@ from typing_extensions import Self -class WebKeyServiceBetaState(str, Enum): +class BetaWebKeyServiceState(str, Enum): """ - - STATE_INITIAL: A newly created key is in the initial state and published to the public key endpoint. - STATE_ACTIVE: The active key is used to sign tokens. Only one key can be active at a time. - STATE_INACTIVE: The inactive key is not used to sign tokens anymore, but still published to the public key endpoint. - STATE_REMOVED: The removed key is not used to sign tokens anymore and not published to the public key endpoint. + BetaWebKeyServiceState """ """ @@ -34,7 +34,7 @@ class WebKeyServiceBetaState(str, Enum): @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of WebKeyServiceBetaState from a JSON string""" + """Create an instance of BetaWebKeyServiceState from a JSON string""" return cls(json.loads(json_str)) diff --git a/zitadel_client/models/beta_web_key_service_web_key.py b/zitadel_client/models/beta_web_key_service_web_key.py new file mode 100644 index 00000000..26ce6b38 --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_web_key.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.ecdsa import Ecdsa +from zitadel_client.models.ed25519 import Ed25519 +from zitadel_client.models.rsa import Rsa +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BETAWEBKEYSERVICEWEBKEY_ONE_OF_SCHEMAS = ["Ecdsa", "Ed25519", "Rsa"] + +class BetaWebKeyServiceWebKey(BaseModel): + """ + BetaWebKeyServiceWebKey + """ + # data type: Ecdsa + oneof_schema_1_validator: Optional[Ecdsa] = None + # data type: Ed25519 + oneof_schema_2_validator: Optional[Ed25519] = None + # data type: Rsa + oneof_schema_3_validator: Optional[Rsa] = None + actual_instance: Optional[Union[Ecdsa, Ed25519, Rsa]] = None + one_of_schemas: Set[str] = { "Ecdsa", "Ed25519", "Rsa" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BetaWebKeyServiceWebKey.model_construct() + error_messages = [] + match = 0 + # validate data type: Ecdsa + if not isinstance(v, Ecdsa): + error_messages.append(f"Error! Input type `{type(v)}` is not `Ecdsa`") + else: + match += 1 + # validate data type: Ed25519 + if not isinstance(v, Ed25519): + error_messages.append(f"Error! Input type `{type(v)}` is not `Ed25519`") + else: + match += 1 + # validate data type: Rsa + if not isinstance(v, Rsa): + error_messages.append(f"Error! Input type `{type(v)}` is not `Rsa`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BetaWebKeyServiceWebKey with oneOf schemas: Ecdsa, Ed25519, Rsa. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BetaWebKeyServiceWebKey with oneOf schemas: Ecdsa, Ed25519, Rsa. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Ecdsa + try: + instance.actual_instance = Ecdsa.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Ed25519 + try: + instance.actual_instance = Ed25519.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Rsa + try: + instance.actual_instance = Rsa.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BetaWebKeyServiceWebKey with oneOf schemas: Ecdsa, Ed25519, Rsa. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BetaWebKeyServiceWebKey with oneOf schemas: Ecdsa, Ed25519, Rsa. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Ecdsa, Ed25519, Rsa]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/creation_date_query.py b/zitadel_client/models/creation_date_query.py new file mode 100644 index 00000000..e1585e5b --- /dev/null +++ b/zitadel_client/models/creation_date_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_session_service_creation_date_query import BetaSessionServiceCreationDateQuery +from typing import Optional, Set +from typing_extensions import Self + +class CreationDateQuery(BaseModel): + """ + CreationDateQuery + """ # noqa: E501 + creation_date_query: BetaSessionServiceCreationDateQuery = Field(alias="creationDateQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreationDateQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of creation_date_query + if self.creation_date_query: + _dict['creationDateQuery'] = self.creation_date_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreationDateQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDateQuery": BetaSessionServiceCreationDateQuery.from_dict(obj["creationDateQuery"]) if obj.get("creationDateQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/creation_date_query1.py b/zitadel_client/models/creation_date_query1.py new file mode 100644 index 00000000..9b56f659 --- /dev/null +++ b/zitadel_client/models/creation_date_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.session_service_creation_date_query import SessionServiceCreationDateQuery +from typing import Optional, Set +from typing_extensions import Self + +class CreationDateQuery1(BaseModel): + """ + CreationDateQuery1 + """ # noqa: E501 + creation_date_query: SessionServiceCreationDateQuery = Field(alias="creationDateQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreationDateQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of creation_date_query + if self.creation_date_query: + _dict['creationDateQuery'] = self.creation_date_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreationDateQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDateQuery": SessionServiceCreationDateQuery.from_dict(obj["creationDateQuery"]) if obj.get("creationDateQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/creator_query.py b/zitadel_client/models/creator_query.py new file mode 100644 index 00000000..a1cd6552 --- /dev/null +++ b/zitadel_client/models/creator_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.session_service_creator_query import SessionServiceCreatorQuery +from typing import Optional, Set +from typing_extensions import Self + +class CreatorQuery(BaseModel): + """ + CreatorQuery + """ # noqa: E501 + creator_query: SessionServiceCreatorQuery = Field(alias="creatorQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreatorQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of creator_query + if self.creator_query: + _dict['creatorQuery'] = self.creator_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreatorQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creatorQuery": SessionServiceCreatorQuery.from_dict(obj["creatorQuery"]) if obj.get("creatorQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/saml_service_protobuf_any.py b/zitadel_client/models/current_password.py similarity index 85% rename from zitadel_client/models/saml_service_protobuf_any.py rename to zitadel_client/models/current_password.py index 4d5ede7f..254fb812 100644 --- a/zitadel_client/models/saml_service_protobuf_any.py +++ b/zitadel_client/models/current_password.py @@ -18,15 +18,15 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class SAMLServiceProtobufAny(BaseModel): +class CurrentPassword(BaseModel): """ - SAMLServiceProtobufAny + CurrentPassword """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + current_password: StrictStr = Field(alias="currentPassword") model_config = ConfigDict( populate_by_name=True, @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SAMLServiceProtobufAny from a JSON string""" + """Create an instance of CurrentPassword from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SAMLServiceProtobufAny from a dict""" + """Create an instance of CurrentPassword from a dict""" if obj is None: return None @@ -79,7 +79,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "currentPassword": obj.get("currentPassword") }) return _obj diff --git a/zitadel_client/models/default_query.py b/zitadel_client/models/default_query.py new file mode 100644 index 00000000..7bc84dd0 --- /dev/null +++ b/zitadel_client/models/default_query.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DefaultQuery(BaseModel): + """ + DefaultQuery + """ # noqa: E501 + default_query: Dict[str, Any] = Field(alias="defaultQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DefaultQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DefaultQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "defaultQuery": obj.get("defaultQuery") + }) + return _obj + + diff --git a/zitadel_client/models/deny.py b/zitadel_client/models/deny.py new file mode 100644 index 00000000..5b35dc0f --- /dev/null +++ b/zitadel_client/models/deny.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Deny(BaseModel): + """ + Deny + """ # noqa: E501 + deny: Dict[str, Any] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Deny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Deny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deny": obj.get("deny") + }) + return _obj + + diff --git a/zitadel_client/models/display_name_query.py b/zitadel_client/models/display_name_query.py new file mode 100644 index 00000000..9b2eab57 --- /dev/null +++ b/zitadel_client/models/display_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_display_name_query import UserServiceDisplayNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class DisplayNameQuery(BaseModel): + """ + DisplayNameQuery + """ # noqa: E501 + display_name_query: UserServiceDisplayNameQuery = Field(alias="displayNameQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DisplayNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of display_name_query + if self.display_name_query: + _dict['displayNameQuery'] = self.display_name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DisplayNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "displayNameQuery": UserServiceDisplayNameQuery.from_dict(obj["displayNameQuery"]) if obj.get("displayNameQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/display_name_query1.py b/zitadel_client/models/display_name_query1.py new file mode 100644 index 00000000..e28c4b72 --- /dev/null +++ b/zitadel_client/models/display_name_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_display_name_query import BetaUserServiceDisplayNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class DisplayNameQuery1(BaseModel): + """ + DisplayNameQuery1 + """ # noqa: E501 + display_name_query: BetaUserServiceDisplayNameQuery = Field(alias="displayNameQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DisplayNameQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of display_name_query + if self.display_name_query: + _dict['displayNameQuery'] = self.display_name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DisplayNameQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "displayNameQuery": BetaUserServiceDisplayNameQuery.from_dict(obj["displayNameQuery"]) if obj.get("displayNameQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/domain_query.py b/zitadel_client/models/domain_query.py new file mode 100644 index 00000000..30f3de33 --- /dev/null +++ b/zitadel_client/models/domain_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.organization_service_organization_domain_query import OrganizationServiceOrganizationDomainQuery +from typing import Optional, Set +from typing_extensions import Self + +class DomainQuery(BaseModel): + """ + DomainQuery + """ # noqa: E501 + domain_query: OrganizationServiceOrganizationDomainQuery = Field(alias="domainQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of domain_query + if self.domain_query: + _dict['domainQuery'] = self.domain_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domainQuery": OrganizationServiceOrganizationDomainQuery.from_dict(obj["domainQuery"]) if obj.get("domainQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_ecdsa.py b/zitadel_client/models/ecdsa.py similarity index 79% rename from zitadel_client/models/web_key_service_beta_ecdsa.py rename to zitadel_client/models/ecdsa.py index 5ec0c13b..09243993 100644 --- a/zitadel_client/models/web_key_service_beta_ecdsa.py +++ b/zitadel_client/models/ecdsa.py @@ -18,16 +18,16 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.web_key_service_beta_ecdsa_curve import WebKeyServiceBetaECDSACurve +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_web_key_service_ecdsa import BetaWebKeyServiceECDSA from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceBetaECDSA(BaseModel): +class Ecdsa(BaseModel): """ - WebKeyServiceBetaECDSA + Ecdsa """ # noqa: E501 - curve: Optional[WebKeyServiceBetaECDSACurve] = WebKeyServiceBetaECDSACurve.ECDSA_CURVE_UNSPECIFIED + ecdsa: BetaWebKeyServiceECDSA model_config = ConfigDict( populate_by_name=True, @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaECDSA from a JSON string""" + """Create an instance of Ecdsa from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -68,11 +68,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of ecdsa + if self.ecdsa: + _dict['ecdsa'] = self.ecdsa.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaECDSA from a dict""" + """Create an instance of Ecdsa from a dict""" if obj is None: return None @@ -80,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "curve": obj.get("curve") if obj.get("curve") is not None else WebKeyServiceBetaECDSACurve.ECDSA_CURVE_UNSPECIFIED + "ecdsa": BetaWebKeyServiceECDSA.from_dict(obj["ecdsa"]) if obj.get("ecdsa") is not None else None }) return _obj diff --git a/zitadel_client/models/ed25519.py b/zitadel_client/models/ed25519.py new file mode 100644 index 00000000..53793072 --- /dev/null +++ b/zitadel_client/models/ed25519.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Ed25519(BaseModel): + """ + Ed25519 + """ # noqa: E501 + ed25519: Dict[str, Any] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Ed25519 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Ed25519 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ed25519": obj.get("ed25519") + }) + return _obj + + diff --git a/zitadel_client/models/email_query.py b/zitadel_client/models/email_query.py new file mode 100644 index 00000000..4a0f544f --- /dev/null +++ b/zitadel_client/models/email_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_email_query import UserServiceEmailQuery +from typing import Optional, Set +from typing_extensions import Self + +class EmailQuery(BaseModel): + """ + EmailQuery + """ # noqa: E501 + email_query: UserServiceEmailQuery = Field(alias="emailQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EmailQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of email_query + if self.email_query: + _dict['emailQuery'] = self.email_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EmailQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "emailQuery": UserServiceEmailQuery.from_dict(obj["emailQuery"]) if obj.get("emailQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/email_query1.py b/zitadel_client/models/email_query1.py new file mode 100644 index 00000000..7cd00fa6 --- /dev/null +++ b/zitadel_client/models/email_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_email_query import BetaUserServiceEmailQuery +from typing import Optional, Set +from typing_extensions import Self + +class EmailQuery1(BaseModel): + """ + EmailQuery1 + """ # noqa: E501 + email_query: BetaUserServiceEmailQuery = Field(alias="emailQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EmailQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of email_query + if self.email_query: + _dict['emailQuery'] = self.email_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EmailQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "emailQuery": BetaUserServiceEmailQuery.from_dict(obj["emailQuery"]) if obj.get("emailQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/error.py b/zitadel_client/models/error.py new file mode 100644 index 00000000..350e0428 --- /dev/null +++ b/zitadel_client/models/error.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.oidc_service_authorization_error import OIDCServiceAuthorizationError +from typing import Optional, Set +from typing_extensions import Self + +class Error(BaseModel): + """ + Error + """ # noqa: E501 + error: OIDCServiceAuthorizationError + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": OIDCServiceAuthorizationError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/error1.py b/zitadel_client/models/error1.py new file mode 100644 index 00000000..16923b70 --- /dev/null +++ b/zitadel_client/models/error1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.saml_service_authorization_error import SAMLServiceAuthorizationError +from typing import Optional, Set +from typing_extensions import Self + +class Error1(BaseModel): + """ + Error1 + """ # noqa: E501 + error: SAMLServiceAuthorizationError + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Error1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Error1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": SAMLServiceAuthorizationError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/error2.py b/zitadel_client/models/error2.py new file mode 100644 index 00000000..a8d882dd --- /dev/null +++ b/zitadel_client/models/error2.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_oidc_service_authorization_error import BetaOIDCServiceAuthorizationError +from typing import Optional, Set +from typing_extensions import Self + +class Error2(BaseModel): + """ + Error2 + """ # noqa: E501 + error: BetaOIDCServiceAuthorizationError + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Error2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Error2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": BetaOIDCServiceAuthorizationError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/event.py b/zitadel_client/models/event.py new file mode 100644 index 00000000..90fbf19e --- /dev/null +++ b/zitadel_client/models/event.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_action_service_event_execution import BetaActionServiceEventExecution +from typing import Optional, Set +from typing_extensions import Self + +class Event(BaseModel): + """ + Event + """ # noqa: E501 + event: BetaActionServiceEventExecution + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Event from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of event + if self.event: + _dict['event'] = self.event.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Event from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "event": BetaActionServiceEventExecution.from_dict(obj["event"]) if obj.get("event") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/event1.py b/zitadel_client/models/event1.py new file mode 100644 index 00000000..d39d9c82 --- /dev/null +++ b/zitadel_client/models/event1.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Event1(BaseModel): + """ + Event1 + """ # noqa: E501 + event: StrictStr = Field(description="Event name as condition.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Event1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Event1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "event": obj.get("event") + }) + return _obj + + diff --git a/zitadel_client/models/execution_type_filter.py b/zitadel_client/models/execution_type_filter.py new file mode 100644 index 00000000..ca240059 --- /dev/null +++ b/zitadel_client/models/execution_type_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_action_service_execution_type_filter import BetaActionServiceExecutionTypeFilter +from typing import Optional, Set +from typing_extensions import Self + +class ExecutionTypeFilter(BaseModel): + """ + ExecutionTypeFilter + """ # noqa: E501 + execution_type_filter: BetaActionServiceExecutionTypeFilter = Field(alias="executionTypeFilter") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExecutionTypeFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of execution_type_filter + if self.execution_type_filter: + _dict['executionTypeFilter'] = self.execution_type_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExecutionTypeFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "executionTypeFilter": BetaActionServiceExecutionTypeFilter.from_dict(obj["executionTypeFilter"]) if obj.get("executionTypeFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/feature_service_any.py b/zitadel_client/models/feature_service_any.py new file mode 100644 index 00000000..59872b63 --- /dev/null +++ b/zitadel_client/models/feature_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/feature_service_connect_error.py b/zitadel_client/models/feature_service_connect_error.py new file mode 100644 index 00000000..460acc05 --- /dev/null +++ b/zitadel_client/models/feature_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.feature_service_any import FeatureServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[FeatureServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": FeatureServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/feature_service_details.py b/zitadel_client/models/feature_service_details.py index 55c30dc9..a14f050c 100644 --- a/zitadel_client/models/feature_service_details.py +++ b/zitadel_client/models/feature_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,10 @@ class FeatureServiceDetails(BaseModel): """ FeatureServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - 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") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") model_config = ConfigDict( populate_by_name=True, @@ -71,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/feature_service_feature_flag.py b/zitadel_client/models/feature_service_feature_flag.py index 8e847678..7b561e8a 100644 --- a/zitadel_client/models/feature_service_feature_flag.py +++ b/zitadel_client/models/feature_service_feature_flag.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_source import FeatureServiceSource from typing import Optional, Set from typing_extensions import Self @@ -27,8 +27,8 @@ class FeatureServiceFeatureFlag(BaseModel): """ FeatureFlag is a simple boolean Feature setting, without further payload. """ # noqa: E501 - enabled: Optional[StrictBool] = Field(default=None, description="Whether a feature is enabled.") - source: Optional[FeatureServiceSource] = FeatureServiceSource.SOURCE_UNSPECIFIED + enabled: Optional[StrictBool] = None + source: Optional[FeatureServiceSource] = None model_config = ConfigDict( populate_by_name=True, @@ -82,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "enabled": obj.get("enabled"), - "source": obj.get("source") if obj.get("source") is not None else FeatureServiceSource.SOURCE_UNSPECIFIED + "source": obj.get("source") }) return _obj diff --git a/zitadel_client/models/feature_service_get_instance_features_request.py b/zitadel_client/models/feature_service_get_instance_features_request.py new file mode 100644 index 00000000..a6466236 --- /dev/null +++ b/zitadel_client/models/feature_service_get_instance_features_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceGetInstanceFeaturesRequest(BaseModel): + """ + FeatureServiceGetInstanceFeaturesRequest + """ # noqa: E501 + inheritance: Optional[StrictBool] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceGetInstanceFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceGetInstanceFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inheritance": obj.get("inheritance") + }) + 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..6e9bd08b 100644 --- a/zitadel_client/models/feature_service_get_instance_features_response.py +++ b/zitadel_client/models/feature_service_get_instance_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from zitadel_client.models.feature_service_feature_flag import FeatureServiceFeatureFlag from zitadel_client.models.feature_service_improved_performance_feature_flag import FeatureServiceImprovedPerformanceFeatureFlag diff --git a/zitadel_client/models/feature_service_get_organization_features_request.py b/zitadel_client/models/feature_service_get_organization_features_request.py new file mode 100644 index 00000000..4adc53c9 --- /dev/null +++ b/zitadel_client/models/feature_service_get_organization_features_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceGetOrganizationFeaturesRequest(BaseModel): + """ + FeatureServiceGetOrganizationFeaturesRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + inheritance: Optional[StrictBool] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceGetOrganizationFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceGetOrganizationFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "inheritance": obj.get("inheritance") + }) + 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..ab9ec5dc 100644 --- a/zitadel_client/models/feature_service_get_organization_features_response.py +++ b/zitadel_client/models/feature_service_get_organization_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self 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..62b13bc1 100644 --- a/zitadel_client/models/feature_service_get_system_features_response.py +++ b/zitadel_client/models/feature_service_get_system_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from zitadel_client.models.feature_service_feature_flag import FeatureServiceFeatureFlag from zitadel_client.models.feature_service_improved_performance_feature_flag import FeatureServiceImprovedPerformanceFeatureFlag diff --git a/zitadel_client/models/feature_service_get_user_features_request.py b/zitadel_client/models/feature_service_get_user_features_request.py new file mode 100644 index 00000000..9413083d --- /dev/null +++ b/zitadel_client/models/feature_service_get_user_features_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceGetUserFeaturesRequest(BaseModel): + """ + FeatureServiceGetUserFeaturesRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + inheritance: Optional[StrictBool] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceGetUserFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceGetUserFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "inheritance": obj.get("inheritance") + }) + 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..e4e67b44 100644 --- a/zitadel_client/models/feature_service_get_user_features_response.py +++ b/zitadel_client/models/feature_service_get_user_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/feature_service_improved_performance.py b/zitadel_client/models/feature_service_improved_performance.py index d98ee7ff..ea98a8c9 100644 --- a/zitadel_client/models/feature_service_improved_performance.py +++ b/zitadel_client/models/feature_service_improved_performance.py @@ -20,7 +20,7 @@ class FeatureServiceImprovedPerformance(str, Enum): """ - - IMPROVED_PERFORMANCE_ORG_BY_ID: Uses the eventstore to query the org by id instead of the sql table. - IMPROVED_PERFORMANCE_PROJECT_GRANT: Improves performance on write side by using optimized processes to query data to determine correctnes of data. - IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED: Improve performance on write side when users are checked against verified domains from other organizations. + FeatureServiceImprovedPerformance """ """ 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..b5197989 100644 --- a/zitadel_client/models/feature_service_improved_performance_feature_flag.py +++ b/zitadel_client/models/feature_service_improved_performance_feature_flag.py @@ -28,8 +28,8 @@ class FeatureServiceImprovedPerformanceFeatureFlag(BaseModel): """ FeatureServiceImprovedPerformanceFeatureFlag """ # 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 + execution_paths: Optional[List[FeatureServiceImprovedPerformance]] = Field(default=None, alias="executionPaths") + source: Optional[FeatureServiceSource] = None model_config = ConfigDict( populate_by_name=True, @@ -83,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "executionPaths": obj.get("executionPaths"), - "source": obj.get("source") if obj.get("source") is not None else FeatureServiceSource.SOURCE_UNSPECIFIED + "source": obj.get("source") }) return _obj diff --git a/zitadel_client/models/feature_service_login_v2.py b/zitadel_client/models/feature_service_login_v2.py index 361d389d..9adb6c70 100644 --- a/zitadel_client/models/feature_service_login_v2.py +++ b/zitadel_client/models/feature_service_login_v2.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -68,6 +68,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if base_uri (nullable) is None + # and model_fields_set contains the field + if self.base_uri is None and "base_uri" in self.model_fields_set: + _dict['baseUri'] = None + return _dict @classmethod 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..728155a2 100644 --- a/zitadel_client/models/feature_service_login_v2_feature_flag.py +++ b/zitadel_client/models/feature_service_login_v2_feature_flag.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_source import FeatureServiceSource from typing import Optional, Set from typing_extensions import Self @@ -29,7 +29,7 @@ class FeatureServiceLoginV2FeatureFlag(BaseModel): """ # noqa: E501 required: Optional[StrictBool] = None base_uri: Optional[StrictStr] = Field(default=None, alias="baseUri") - source: Optional[FeatureServiceSource] = FeatureServiceSource.SOURCE_UNSPECIFIED + source: Optional[FeatureServiceSource] = None model_config = ConfigDict( populate_by_name=True, @@ -70,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if base_uri (nullable) is None + # and model_fields_set contains the field + if self.base_uri is None and "base_uri" in self.model_fields_set: + _dict['baseUri'] = None + return _dict @classmethod @@ -84,7 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "required": obj.get("required"), "baseUri": obj.get("baseUri"), - "source": obj.get("source") if obj.get("source") is not None else FeatureServiceSource.SOURCE_UNSPECIFIED + "source": obj.get("source") }) 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..0deb68e5 100644 --- a/zitadel_client/models/feature_service_reset_instance_features_response.py +++ b/zitadel_client/models/feature_service_reset_instance_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/feature_service_reset_organization_features_request.py b/zitadel_client/models/feature_service_reset_organization_features_request.py new file mode 100644 index 00000000..581fe89c --- /dev/null +++ b/zitadel_client/models/feature_service_reset_organization_features_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceResetOrganizationFeaturesRequest(BaseModel): + """ + FeatureServiceResetOrganizationFeaturesRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceResetOrganizationFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceResetOrganizationFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId") + }) + 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..26bcca4d 100644 --- a/zitadel_client/models/feature_service_reset_organization_features_response.py +++ b/zitadel_client/models/feature_service_reset_organization_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self 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..36ec64f7 100644 --- a/zitadel_client/models/feature_service_reset_system_features_response.py +++ b/zitadel_client/models/feature_service_reset_system_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/feature_service_reset_user_features_request.py b/zitadel_client/models/feature_service_reset_user_features_request.py new file mode 100644 index 00000000..249b7ee3 --- /dev/null +++ b/zitadel_client/models/feature_service_reset_user_features_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceResetUserFeaturesRequest(BaseModel): + """ + FeatureServiceResetUserFeaturesRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceResetUserFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceResetUserFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..2bf30876 100644 --- a/zitadel_client/models/feature_service_reset_user_features_response.py +++ b/zitadel_client/models/feature_service_reset_user_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self 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..cdaf183e 100644 --- a/zitadel_client/models/feature_service_set_instance_features_request.py +++ b/zitadel_client/models/feature_service_set_instance_features_request.py @@ -28,20 +28,20 @@ class FeatureServiceSetInstanceFeaturesRequest(BaseModel): """ FeatureServiceSetInstanceFeaturesRequest """ # noqa: E501 - login_default_org: Optional[StrictBool] = Field(default=None, description="The login UI will use the settings of the default org (and not from the instance) if no organization context is set", alias="loginDefaultOrg") - oidc_trigger_introspection_projections: Optional[StrictBool] = Field(default=None, description="Enable projection triggers during an introspection request. This can act as workaround if there are noticeable consistency issues in the introspection response but can have an impact on performance. We are planning to remove triggers for introspection requests in the future. Please raise an issue if you needed to enable this feature.", alias="oidcTriggerIntrospectionProjections") - oidc_legacy_introspection: Optional[StrictBool] = Field(default=None, description="We have recently refactored the introspection endpoint for performance reasons. This feature can be used to rollback to the legacy implementation if unexpected bugs arise. Please raise an issue if you needed to enable this feature.", alias="oidcLegacyIntrospection") - user_schema: Optional[StrictBool] = Field(default=None, description="User Schemas allow to manage data schemas of user. If the flag is enabled, you'll be able to use the new API and its features. Note that it is still in an early stage.", alias="userSchema") - oidc_token_exchange: Optional[StrictBool] = Field(default=None, description="Enable the experimental `urn:ietf:params:oauth:grant-type:token-exchange` grant type for the OIDC token endpoint. Token exchange can be used to request tokens with a lesser scope or impersonate other users. See the security policy to allow impersonation on an instance.", alias="oidcTokenExchange") - improved_performance: Optional[List[FeatureServiceImprovedPerformance]] = Field(default=None, description="Improves performance of specified execution paths.", alias="improvedPerformance") - web_key: Optional[StrictBool] = Field(default=None, description="Enable the webkey/v3alpha API. The first time this feature is enabled, web keys are generated and activated.", alias="webKey") - debug_oidc_parent_error: Optional[StrictBool] = Field(default=None, description="Return parent errors to OIDC clients for debugging purposes. Parent errors may contain sensitive data or unwanted details about the system status of zitadel. Only enable if really needed.", alias="debugOidcParentError") - oidc_single_v1_session_termination: Optional[StrictBool] = Field(default=None, description="If the flag is enabled, you'll be able to terminate a single session from the login UI by providing an id_token with a `sid` claim as id_token_hint on the end_session endpoint. Note that currently all sessions from the same user agent (browser) are terminated in the login UI. Sessions managed through the Session API already allow the termination of single sessions.", alias="oidcSingleV1SessionTermination") - disable_user_token_event: Optional[StrictBool] = Field(default=None, description="Do not push user token meta-event user.token.v2.added to improve performance on many concurrent single (machine-)user logins", alias="disableUserTokenEvent") - 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_default_org: Optional[StrictBool] = Field(default=None, alias="loginDefaultOrg") + oidc_trigger_introspection_projections: Optional[StrictBool] = Field(default=None, alias="oidcTriggerIntrospectionProjections") + oidc_legacy_introspection: Optional[StrictBool] = Field(default=None, alias="oidcLegacyIntrospection") + user_schema: Optional[StrictBool] = Field(default=None, alias="userSchema") + oidc_token_exchange: Optional[StrictBool] = Field(default=None, alias="oidcTokenExchange") + improved_performance: Optional[List[FeatureServiceImprovedPerformance]] = Field(default=None, alias="improvedPerformance") + web_key: Optional[StrictBool] = Field(default=None, alias="webKey") + debug_oidc_parent_error: Optional[StrictBool] = Field(default=None, alias="debugOidcParentError") + oidc_single_v1_session_termination: Optional[StrictBool] = Field(default=None, alias="oidcSingleV1SessionTermination") + disable_user_token_event: Optional[StrictBool] = Field(default=None, alias="disableUserTokenEvent") + enable_back_channel_logout: Optional[StrictBool] = Field(default=None, 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") - 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") + permission_check_v2: Optional[StrictBool] = Field(default=None, alias="permissionCheckV2") + console_use_v2_user_api: Optional[StrictBool] = Field(default=None, alias="consoleUseV2UserApi") model_config = ConfigDict( populate_by_name=True, @@ -85,6 +85,66 @@ 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() + # set to None if login_default_org (nullable) is None + # and model_fields_set contains the field + if self.login_default_org is None and "login_default_org" in self.model_fields_set: + _dict['loginDefaultOrg'] = None + + # set to None if oidc_trigger_introspection_projections (nullable) is None + # and model_fields_set contains the field + if self.oidc_trigger_introspection_projections is None and "oidc_trigger_introspection_projections" in self.model_fields_set: + _dict['oidcTriggerIntrospectionProjections'] = None + + # set to None if oidc_legacy_introspection (nullable) is None + # and model_fields_set contains the field + if self.oidc_legacy_introspection is None and "oidc_legacy_introspection" in self.model_fields_set: + _dict['oidcLegacyIntrospection'] = None + + # set to None if user_schema (nullable) is None + # and model_fields_set contains the field + if self.user_schema is None and "user_schema" in self.model_fields_set: + _dict['userSchema'] = None + + # set to None if oidc_token_exchange (nullable) is None + # and model_fields_set contains the field + if self.oidc_token_exchange is None and "oidc_token_exchange" in self.model_fields_set: + _dict['oidcTokenExchange'] = None + + # set to None if web_key (nullable) is None + # and model_fields_set contains the field + if self.web_key is None and "web_key" in self.model_fields_set: + _dict['webKey'] = None + + # set to None if debug_oidc_parent_error (nullable) is None + # and model_fields_set contains the field + if self.debug_oidc_parent_error is None and "debug_oidc_parent_error" in self.model_fields_set: + _dict['debugOidcParentError'] = None + + # set to None if oidc_single_v1_session_termination (nullable) is None + # and model_fields_set contains the field + if self.oidc_single_v1_session_termination is None and "oidc_single_v1_session_termination" in self.model_fields_set: + _dict['oidcSingleV1SessionTermination'] = None + + # set to None if disable_user_token_event (nullable) is None + # and model_fields_set contains the field + if self.disable_user_token_event is None and "disable_user_token_event" in self.model_fields_set: + _dict['disableUserTokenEvent'] = None + + # set to None if enable_back_channel_logout (nullable) is None + # and model_fields_set contains the field + if self.enable_back_channel_logout is None and "enable_back_channel_logout" in self.model_fields_set: + _dict['enableBackChannelLogout'] = None + + # set to None if permission_check_v2 (nullable) is None + # and model_fields_set contains the field + if self.permission_check_v2 is None and "permission_check_v2" in self.model_fields_set: + _dict['permissionCheckV2'] = None + + # set to None if console_use_v2_user_api (nullable) is None + # and model_fields_set contains the field + if self.console_use_v2_user_api is None and "console_use_v2_user_api" in self.model_fields_set: + _dict['consoleUseV2UserApi'] = None + return _dict @classmethod 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..3c2ac8e8 100644 --- a/zitadel_client/models/feature_service_set_instance_features_response.py +++ b/zitadel_client/models/feature_service_set_instance_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/feature_service_set_organization_features_request.py b/zitadel_client/models/feature_service_set_organization_features_request.py new file mode 100644 index 00000000..680e1897 --- /dev/null +++ b/zitadel_client/models/feature_service_set_organization_features_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceSetOrganizationFeaturesRequest(BaseModel): + """ + FeatureServiceSetOrganizationFeaturesRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceSetOrganizationFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceSetOrganizationFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId") + }) + 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..aa0e9589 100644 --- a/zitadel_client/models/feature_service_set_organization_features_response.py +++ b/zitadel_client/models/feature_service_set_organization_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self 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..62125330 100644 --- a/zitadel_client/models/feature_service_set_system_features_request.py +++ b/zitadel_client/models/feature_service_set_system_features_request.py @@ -28,17 +28,17 @@ class FeatureServiceSetSystemFeaturesRequest(BaseModel): """ FeatureServiceSetSystemFeaturesRequest """ # noqa: E501 - login_default_org: Optional[StrictBool] = Field(default=None, description="The login UI will use the settings of the default org (and not from the instance) if no organization context is set", alias="loginDefaultOrg") - oidc_trigger_introspection_projections: Optional[StrictBool] = Field(default=None, description="Enable projection triggers during an introspection request. This can act as workaround if there are noticeable consistency issues in the introspection response but can have an impact on performance. We are planning to remove triggers for introspection requests in the future. Please raise an issue if you needed to enable this feature.", alias="oidcTriggerIntrospectionProjections") - oidc_legacy_introspection: Optional[StrictBool] = Field(default=None, description="We have recently refactored the introspection endpoint for performance reasons. This feature can be used to rollback to the legacy implementation if unexpected bugs arise. Please raise an issue if you needed to enable this feature.", alias="oidcLegacyIntrospection") - user_schema: Optional[StrictBool] = Field(default=None, description="User Schemas allow to manage data schemas of user. If the flag is enabled, you'll be able to use the new API and its features. Note that it is still in an early stage.", alias="userSchema") - oidc_token_exchange: Optional[StrictBool] = Field(default=None, description="Enable the experimental `urn:ietf:params:oauth:grant-type:token-exchange` grant type for the OIDC token endpoint. Token exchange can be used to request tokens with a lesser scope or impersonate other users. See the security policy to allow impersonation on an instance.", alias="oidcTokenExchange") - improved_performance: Optional[List[FeatureServiceImprovedPerformance]] = Field(default=None, description="Improves performance of specified execution paths.", alias="improvedPerformance") - oidc_single_v1_session_termination: Optional[StrictBool] = Field(default=None, description="If the flag is enabled, you'll be able to terminate a single session from the login UI by providing an id_token with a `sid` claim as id_token_hint on the end_session endpoint. Note that currently all sessions from the same user agent (browser) are terminated in the login UI. Sessions managed through the Session API already allow the termination of single sessions.", alias="oidcSingleV1SessionTermination") - disable_user_token_event: Optional[StrictBool] = Field(default=None, description="Do not push user token meta-event user.token.v2.added to improve performance on many concurrent single (machine-)user logins", alias="disableUserTokenEvent") - 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_default_org: Optional[StrictBool] = Field(default=None, alias="loginDefaultOrg") + oidc_trigger_introspection_projections: Optional[StrictBool] = Field(default=None, alias="oidcTriggerIntrospectionProjections") + oidc_legacy_introspection: Optional[StrictBool] = Field(default=None, alias="oidcLegacyIntrospection") + user_schema: Optional[StrictBool] = Field(default=None, alias="userSchema") + oidc_token_exchange: Optional[StrictBool] = Field(default=None, alias="oidcTokenExchange") + improved_performance: Optional[List[FeatureServiceImprovedPerformance]] = Field(default=None, alias="improvedPerformance") + oidc_single_v1_session_termination: Optional[StrictBool] = Field(default=None, alias="oidcSingleV1SessionTermination") + disable_user_token_event: Optional[StrictBool] = Field(default=None, alias="disableUserTokenEvent") + enable_back_channel_logout: Optional[StrictBool] = Field(default=None, 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") + permission_check_v2: Optional[StrictBool] = Field(default=None, alias="permissionCheckV2") model_config = ConfigDict( populate_by_name=True, @@ -82,6 +82,51 @@ 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() + # set to None if login_default_org (nullable) is None + # and model_fields_set contains the field + if self.login_default_org is None and "login_default_org" in self.model_fields_set: + _dict['loginDefaultOrg'] = None + + # set to None if oidc_trigger_introspection_projections (nullable) is None + # and model_fields_set contains the field + if self.oidc_trigger_introspection_projections is None and "oidc_trigger_introspection_projections" in self.model_fields_set: + _dict['oidcTriggerIntrospectionProjections'] = None + + # set to None if oidc_legacy_introspection (nullable) is None + # and model_fields_set contains the field + if self.oidc_legacy_introspection is None and "oidc_legacy_introspection" in self.model_fields_set: + _dict['oidcLegacyIntrospection'] = None + + # set to None if user_schema (nullable) is None + # and model_fields_set contains the field + if self.user_schema is None and "user_schema" in self.model_fields_set: + _dict['userSchema'] = None + + # set to None if oidc_token_exchange (nullable) is None + # and model_fields_set contains the field + if self.oidc_token_exchange is None and "oidc_token_exchange" in self.model_fields_set: + _dict['oidcTokenExchange'] = None + + # set to None if oidc_single_v1_session_termination (nullable) is None + # and model_fields_set contains the field + if self.oidc_single_v1_session_termination is None and "oidc_single_v1_session_termination" in self.model_fields_set: + _dict['oidcSingleV1SessionTermination'] = None + + # set to None if disable_user_token_event (nullable) is None + # and model_fields_set contains the field + if self.disable_user_token_event is None and "disable_user_token_event" in self.model_fields_set: + _dict['disableUserTokenEvent'] = None + + # set to None if enable_back_channel_logout (nullable) is None + # and model_fields_set contains the field + if self.enable_back_channel_logout is None and "enable_back_channel_logout" in self.model_fields_set: + _dict['enableBackChannelLogout'] = None + + # set to None if permission_check_v2 (nullable) is None + # and model_fields_set contains the field + if self.permission_check_v2 is None and "permission_check_v2" in self.model_fields_set: + _dict['permissionCheckV2'] = None + return _dict @classmethod 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..38083c2b 100644 --- a/zitadel_client/models/feature_service_set_system_features_response.py +++ b/zitadel_client/models/feature_service_set_system_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/feature_service_set_user_feature_request.py b/zitadel_client/models/feature_service_set_user_feature_request.py new file mode 100644 index 00000000..78d777d9 --- /dev/null +++ b/zitadel_client/models/feature_service_set_user_feature_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceSetUserFeatureRequest(BaseModel): + """ + FeatureServiceSetUserFeatureRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceSetUserFeatureRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceSetUserFeatureRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..7ec9cb9c 100644 --- a/zitadel_client/models/feature_service_set_user_features_response.py +++ b/zitadel_client/models/feature_service_set_user_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/first_name_query.py b/zitadel_client/models/first_name_query.py new file mode 100644 index 00000000..5fc41d0b --- /dev/null +++ b/zitadel_client/models/first_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_first_name_query import UserServiceFirstNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class FirstNameQuery(BaseModel): + """ + FirstNameQuery + """ # noqa: E501 + first_name_query: UserServiceFirstNameQuery = Field(alias="firstNameQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirstNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of first_name_query + if self.first_name_query: + _dict['firstNameQuery'] = self.first_name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirstNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "firstNameQuery": UserServiceFirstNameQuery.from_dict(obj["firstNameQuery"]) if obj.get("firstNameQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/first_name_query1.py b/zitadel_client/models/first_name_query1.py new file mode 100644 index 00000000..94a87987 --- /dev/null +++ b/zitadel_client/models/first_name_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_first_name_query import BetaUserServiceFirstNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class FirstNameQuery1(BaseModel): + """ + FirstNameQuery1 + """ # noqa: E501 + first_name_query: BetaUserServiceFirstNameQuery = Field(alias="firstNameQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirstNameQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of first_name_query + if self.first_name_query: + _dict['firstNameQuery'] = self.first_name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirstNameQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "firstNameQuery": BetaUserServiceFirstNameQuery.from_dict(obj["firstNameQuery"]) if obj.get("firstNameQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/function.py b/zitadel_client/models/function.py new file mode 100644 index 00000000..9952aa9b --- /dev/null +++ b/zitadel_client/models/function.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_action_service_function_execution import BetaActionServiceFunctionExecution +from typing import Optional, Set +from typing_extensions import Self + +class Function(BaseModel): + """ + Function + """ # noqa: E501 + function: BetaActionServiceFunctionExecution + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Function from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of function + if self.function: + _dict['function'] = self.function.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Function from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function": BetaActionServiceFunctionExecution.from_dict(obj["function"]) if obj.get("function") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/github.py b/zitadel_client/models/github.py new file mode 100644 index 00000000..a4aa35ba --- /dev/null +++ b/zitadel_client/models/github.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.identity_provider_service_git_hub_config import IdentityProviderServiceGitHubConfig +from typing import Optional, Set +from typing_extensions import Self + +class Github(BaseModel): + """ + Github + """ # noqa: E501 + github: IdentityProviderServiceGitHubConfig + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Github from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of github + if self.github: + _dict['github'] = self.github.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Github from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "github": IdentityProviderServiceGitHubConfig.from_dict(obj["github"]) if obj.get("github") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/github_es.py b/zitadel_client/models/github_es.py new file mode 100644 index 00000000..2f3f95ad --- /dev/null +++ b/zitadel_client/models/github_es.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.identity_provider_service_git_hub_enterprise_server_config import IdentityProviderServiceGitHubEnterpriseServerConfig +from typing import Optional, Set +from typing_extensions import Self + +class GithubEs(BaseModel): + """ + GithubEs + """ # noqa: E501 + github_es: IdentityProviderServiceGitHubEnterpriseServerConfig = Field(alias="githubEs") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GithubEs from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of github_es + if self.github_es: + _dict['githubEs'] = self.github_es.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GithubEs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "githubEs": IdentityProviderServiceGitHubEnterpriseServerConfig.from_dict(obj["githubEs"]) if obj.get("githubEs") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/gitlab.py b/zitadel_client/models/gitlab.py new file mode 100644 index 00000000..994fde06 --- /dev/null +++ b/zitadel_client/models/gitlab.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.identity_provider_service_git_lab_config import IdentityProviderServiceGitLabConfig +from typing import Optional, Set +from typing_extensions import Self + +class Gitlab(BaseModel): + """ + Gitlab + """ # noqa: E501 + gitlab: IdentityProviderServiceGitLabConfig + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Gitlab from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of gitlab + if self.gitlab: + _dict['gitlab'] = self.gitlab.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Gitlab from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "gitlab": IdentityProviderServiceGitLabConfig.from_dict(obj["gitlab"]) if obj.get("gitlab") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/gitlab_self_hosted.py b/zitadel_client/models/gitlab_self_hosted.py new file mode 100644 index 00000000..e7188641 --- /dev/null +++ b/zitadel_client/models/gitlab_self_hosted.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.identity_provider_service_git_lab_self_hosted_config import IdentityProviderServiceGitLabSelfHostedConfig +from typing import Optional, Set +from typing_extensions import Self + +class GitlabSelfHosted(BaseModel): + """ + GitlabSelfHosted + """ # noqa: E501 + gitlab_self_hosted: IdentityProviderServiceGitLabSelfHostedConfig = Field(alias="gitlabSelfHosted") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GitlabSelfHosted from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of gitlab_self_hosted + if self.gitlab_self_hosted: + _dict['gitlabSelfHosted'] = self.gitlab_self_hosted.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GitlabSelfHosted from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "gitlabSelfHosted": IdentityProviderServiceGitLabSelfHostedConfig.from_dict(obj["gitlabSelfHosted"]) if obj.get("gitlabSelfHosted") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/google.py b/zitadel_client/models/google.py new file mode 100644 index 00000000..8638d28b --- /dev/null +++ b/zitadel_client/models/google.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.identity_provider_service_google_config import IdentityProviderServiceGoogleConfig +from typing import Optional, Set +from typing_extensions import Self + +class Google(BaseModel): + """ + Google + """ # noqa: E501 + google: IdentityProviderServiceGoogleConfig + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Google from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of google + if self.google: + _dict['google'] = self.google.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Google from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "google": IdentityProviderServiceGoogleConfig.from_dict(obj["google"]) if obj.get("google") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/group.py b/zitadel_client/models/group.py new file mode 100644 index 00000000..aa552dea --- /dev/null +++ b/zitadel_client/models/group.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Group(BaseModel): + """ + Group + """ # noqa: E501 + group: StrictStr = Field(description="Event group as condition, all events under this group.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Group from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Group from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group": obj.get("group") + }) + return _obj + + diff --git a/zitadel_client/models/hashed_password.py b/zitadel_client/models/hashed_password.py new file mode 100644 index 00000000..6231993a --- /dev/null +++ b/zitadel_client/models/hashed_password.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_hashed_password import UserServiceHashedPassword +from typing import Optional, Set +from typing_extensions import Self + +class HashedPassword(BaseModel): + """ + HashedPassword + """ # noqa: E501 + hashed_password: UserServiceHashedPassword = Field(alias="hashedPassword") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HashedPassword from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of hashed_password + if self.hashed_password: + _dict['hashedPassword'] = self.hashed_password.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HashedPassword from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hashedPassword": UserServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/hashed_password1.py b/zitadel_client/models/hashed_password1.py new file mode 100644 index 00000000..69cf6113 --- /dev/null +++ b/zitadel_client/models/hashed_password1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.organization_service_hashed_password import OrganizationServiceHashedPassword +from typing import Optional, Set +from typing_extensions import Self + +class HashedPassword1(BaseModel): + """ + HashedPassword1 + """ # noqa: E501 + hashed_password: OrganizationServiceHashedPassword = Field(alias="hashedPassword") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HashedPassword1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of hashed_password + if self.hashed_password: + _dict['hashedPassword'] = self.hashed_password.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HashedPassword1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hashedPassword": OrganizationServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/hashed_password2.py b/zitadel_client/models/hashed_password2.py new file mode 100644 index 00000000..9cc18648 --- /dev/null +++ b/zitadel_client/models/hashed_password2.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_hashed_password import BetaUserServiceHashedPassword +from typing import Optional, Set +from typing_extensions import Self + +class HashedPassword2(BaseModel): + """ + HashedPassword2 + """ # noqa: E501 + hashed_password: BetaUserServiceHashedPassword = Field(alias="hashedPassword") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HashedPassword2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of hashed_password + if self.hashed_password: + _dict['hashedPassword'] = self.hashed_password.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HashedPassword2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hashedPassword": BetaUserServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/hashed_password3.py b/zitadel_client/models/hashed_password3.py new file mode 100644 index 00000000..5e1783be --- /dev/null +++ b/zitadel_client/models/hashed_password3.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_organization_service_hashed_password import BetaOrganizationServiceHashedPassword +from typing import Optional, Set +from typing_extensions import Self + +class HashedPassword3(BaseModel): + """ + HashedPassword3 + """ # noqa: E501 + hashed_password: BetaOrganizationServiceHashedPassword = Field(alias="hashedPassword") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HashedPassword3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of hashed_password + if self.hashed_password: + _dict['hashedPassword'] = self.hashed_password.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HashedPassword3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hashedPassword": BetaOrganizationServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/human.py b/zitadel_client/models/human.py new file mode 100644 index 00000000..dc813ddc --- /dev/null +++ b/zitadel_client/models/human.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_human_user import UserServiceHumanUser +from typing import Optional, Set +from typing_extensions import Self + +class Human(BaseModel): + """ + Human + """ # noqa: E501 + human: UserServiceHumanUser + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Human from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of human + if self.human: + _dict['human'] = self.human.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Human from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "human": UserServiceHumanUser.from_dict(obj["human"]) if obj.get("human") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/human1.py b/zitadel_client/models/human1.py new file mode 100644 index 00000000..acc3edf2 --- /dev/null +++ b/zitadel_client/models/human1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.organization_service_add_human_user_request import OrganizationServiceAddHumanUserRequest +from typing import Optional, Set +from typing_extensions import Self + +class Human1(BaseModel): + """ + Human1 + """ # noqa: E501 + human: OrganizationServiceAddHumanUserRequest + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Human1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of human + if self.human: + _dict['human'] = self.human.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Human1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "human": OrganizationServiceAddHumanUserRequest.from_dict(obj["human"]) if obj.get("human") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/human2.py b/zitadel_client/models/human2.py new file mode 100644 index 00000000..794ca389 --- /dev/null +++ b/zitadel_client/models/human2.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_human_user import BetaUserServiceHumanUser +from typing import Optional, Set +from typing_extensions import Self + +class Human2(BaseModel): + """ + Human2 + """ # noqa: E501 + human: BetaUserServiceHumanUser + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Human2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of human + if self.human: + _dict['human'] = self.human.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Human2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "human": BetaUserServiceHumanUser.from_dict(obj["human"]) if obj.get("human") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/human3.py b/zitadel_client/models/human3.py new file mode 100644 index 00000000..a06ee021 --- /dev/null +++ b/zitadel_client/models/human3.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_organization_service_add_human_user_request import BetaOrganizationServiceAddHumanUserRequest +from typing import Optional, Set +from typing_extensions import Self + +class Human3(BaseModel): + """ + Human3 + """ # noqa: E501 + human: BetaOrganizationServiceAddHumanUserRequest + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Human3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of human + if self.human: + _dict['human'] = self.human.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Human3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "human": BetaOrganizationServiceAddHumanUserRequest.from_dict(obj["human"]) if obj.get("human") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/id_query.py b/zitadel_client/models/id_query.py new file mode 100644 index 00000000..d37070e1 --- /dev/null +++ b/zitadel_client/models/id_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.organization_service_organization_id_query import OrganizationServiceOrganizationIDQuery +from typing import Optional, Set +from typing_extensions import Self + +class IdQuery(BaseModel): + """ + IdQuery + """ # noqa: E501 + id_query: OrganizationServiceOrganizationIDQuery = Field(alias="idQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of id_query + if self.id_query: + _dict['idQuery'] = self.id_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idQuery": OrganizationServiceOrganizationIDQuery.from_dict(obj["idQuery"]) if obj.get("idQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/identity_provider_service_any.py b/zitadel_client/models/identity_provider_service_any.py new file mode 100644 index 00000000..d955ea0e --- /dev/null +++ b/zitadel_client/models/identity_provider_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class IdentityProviderServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdentityProviderServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdentityProviderServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/identity_provider_service_auto_linking_option.py b/zitadel_client/models/identity_provider_service_auto_linking_option.py index 0bc79d11..e1913f36 100644 --- a/zitadel_client/models/identity_provider_service_auto_linking_option.py +++ b/zitadel_client/models/identity_provider_service_auto_linking_option.py @@ -20,7 +20,7 @@ class IdentityProviderServiceAutoLinkingOption(str, Enum): """ - - AUTO_LINKING_OPTION_UNSPECIFIED: AUTO_LINKING_OPTION_UNSPECIFIED disables the auto linking prompt. - AUTO_LINKING_OPTION_USERNAME: AUTO_LINKING_OPTION_USERNAME will use the username of the external user to check for a corresponding ZITADEL user. - AUTO_LINKING_OPTION_EMAIL: AUTO_LINKING_OPTION_EMAIL will use the email of the external user to check for a corresponding ZITADEL user with the same verified email Note that in case multiple users match, no prompt will be shown. + IdentityProviderServiceAutoLinkingOption """ """ 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..7a99d495 100644 --- a/zitadel_client/models/identity_provider_service_azure_ad_config.py +++ b/zitadel_client/models/identity_provider_service_azure_ad_config.py @@ -27,9 +27,9 @@ class IdentityProviderServiceAzureADConfig(BaseModel): """ IdentityProviderServiceAzureADConfig """ # noqa: E501 - client_id: Optional[StrictStr] = Field(default=None, alias="clientId") + client_id: Optional[StrictStr] = Field(default=None, description="Client id of the Azure AD application", alias="clientId") 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") + 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.") model_config = ConfigDict( 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..6077f56c 100644 --- a/zitadel_client/models/identity_provider_service_azure_ad_tenant.py +++ b/zitadel_client/models/identity_provider_service_azure_ad_tenant.py @@ -13,77 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.tenant_id import TenantId +from zitadel_client.models.tenant_type import TenantType +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.identity_provider_service_azure_ad_tenant_type import IdentityProviderServiceAzureADTenantType -from typing import Optional, Set -from typing_extensions import Self +IDENTITYPROVIDERSERVICEAZUREADTENANT_ONE_OF_SCHEMAS = ["TenantId", "TenantType"] class IdentityProviderServiceAzureADTenant(BaseModel): """ IdentityProviderServiceAzureADTenant - """ # 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") + """ + # data type: TenantId + oneof_schema_1_validator: Optional[TenantId] = None + # data type: TenantType + oneof_schema_2_validator: Optional[TenantType] = None + actual_instance: Optional[Union[TenantId, TenantType]] = None + one_of_schemas: Set[str] = { "TenantId", "TenantType" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = IdentityProviderServiceAzureADTenant.model_construct() + error_messages = [] + match = 0 + # validate data type: TenantId + if not isinstance(v, TenantId): + error_messages.append(f"Error! Input type `{type(v)}` is not `TenantId`") + else: + match += 1 + # validate data type: TenantType + if not isinstance(v, TenantType): + error_messages.append(f"Error! Input type `{type(v)}` is not `TenantType`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in IdentityProviderServiceAzureADTenant with oneOf schemas: TenantId, TenantType. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in IdentityProviderServiceAzureADTenant with oneOf schemas: TenantId, TenantType. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of IdentityProviderServiceAzureADTenant from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of IdentityProviderServiceAzureADTenant from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into TenantId + try: + instance.actual_instance = TenantId.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TenantType + try: + instance.actual_instance = TenantType.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into IdentityProviderServiceAzureADTenant with oneOf schemas: TenantId, TenantType. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into IdentityProviderServiceAzureADTenant with oneOf schemas: TenantId, TenantType. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], TenantId, TenantType]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _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") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/identity_provider_service_connect_error.py b/zitadel_client/models/identity_provider_service_connect_error.py new file mode 100644 index 00000000..34633523 --- /dev/null +++ b/zitadel_client/models/identity_provider_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.identity_provider_service_any import IdentityProviderServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class IdentityProviderServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[IdentityProviderServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdentityProviderServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdentityProviderServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": IdentityProviderServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/identity_provider_service_details.py b/zitadel_client/models/identity_provider_service_details.py index 00c49b34..d32ebecd 100644 --- a/zitadel_client/models/identity_provider_service_details.py +++ b/zitadel_client/models/identity_provider_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,10 @@ class IdentityProviderServiceDetails(BaseModel): """ IdentityProviderServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - 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") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") model_config = ConfigDict( populate_by_name=True, @@ -71,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod 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..36ac1655 100644 --- a/zitadel_client/models/identity_provider_service_generic_oidc_config.py +++ b/zitadel_client/models/identity_provider_service_generic_oidc_config.py @@ -28,8 +28,8 @@ class IdentityProviderServiceGenericOIDCConfig(BaseModel): """ # noqa: E501 issuer: Optional[StrictStr] = Field(default=None, description="The OIDC issuer of the identity provider.") 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") + 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") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_get_idpby_id_request.py b/zitadel_client/models/identity_provider_service_get_idpby_id_request.py new file mode 100644 index 00000000..16c1d1a3 --- /dev/null +++ b/zitadel_client/models/identity_provider_service_get_idpby_id_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IdentityProviderServiceGetIDPByIDRequest(BaseModel): + """ + IdentityProviderServiceGetIDPByIDRequest + """ # noqa: E501 + id: Optional[StrictStr] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdentityProviderServiceGetIDPByIDRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdentityProviderServiceGetIDPByIDRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/identity_provider_service_get_idpby_id_response.py b/zitadel_client/models/identity_provider_service_get_idpby_id_response.py index b77a75aa..29c161a4 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 @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.identity_provider_service_idp import IdentityProviderServiceIDP from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/identity_provider_service_idp.py b/zitadel_client/models/identity_provider_service_idp.py index 7ad3700c..f1acd848 100644 --- a/zitadel_client/models/identity_provider_service_idp.py +++ b/zitadel_client/models/identity_provider_service_idp.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.identity_provider_service_details import IdentityProviderServiceDetails from zitadel_client.models.identity_provider_service_idp_config import IdentityProviderServiceIDPConfig from zitadel_client.models.identity_provider_service_idp_state import IdentityProviderServiceIDPState @@ -32,9 +32,9 @@ class IdentityProviderServiceIDP(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the identity provider.") details: Optional[IdentityProviderServiceDetails] = None - state: Optional[IdentityProviderServiceIDPState] = IdentityProviderServiceIDPState.IDP_STATE_UNSPECIFIED + state: Optional[IdentityProviderServiceIDPState] = None name: Optional[StrictStr] = None - type: Optional[IdentityProviderServiceIDPType] = IdentityProviderServiceIDPType.IDP_TYPE_UNSPECIFIED + type: Optional[IdentityProviderServiceIDPType] = None config: Optional[IdentityProviderServiceIDPConfig] = None model_config = ConfigDict( @@ -96,9 +96,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "details": IdentityProviderServiceDetails.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 IdentityProviderServiceIDPState.IDP_STATE_UNSPECIFIED, + "state": obj.get("state"), "name": obj.get("name"), - "type": obj.get("type") if obj.get("type") is not None else IdentityProviderServiceIDPType.IDP_TYPE_UNSPECIFIED, + "type": obj.get("type"), "config": IdentityProviderServiceIDPConfig.from_dict(obj["config"]) if obj.get("config") is not None else None }) 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..f25312f9 100644 --- a/zitadel_client/models/identity_provider_service_idp_config.py +++ b/zitadel_client/models/identity_provider_service_idp_config.py @@ -13,111 +13,265 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.apple import Apple +from zitadel_client.models.azure_ad import AzureAd +from zitadel_client.models.github import Github +from zitadel_client.models.github_es import GithubEs +from zitadel_client.models.gitlab import Gitlab +from zitadel_client.models.gitlab_self_hosted import GitlabSelfHosted +from zitadel_client.models.google import Google +from zitadel_client.models.jwt import Jwt +from zitadel_client.models.ldap import Ldap +from zitadel_client.models.oauth import Oauth +from zitadel_client.models.oidc import Oidc +from zitadel_client.models.saml import Saml +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.identity_provider_service_apple_config import IdentityProviderServiceAppleConfig -from zitadel_client.models.identity_provider_service_azure_ad_config import IdentityProviderServiceAzureADConfig -from zitadel_client.models.identity_provider_service_generic_oidc_config import IdentityProviderServiceGenericOIDCConfig -from zitadel_client.models.identity_provider_service_git_hub_config import IdentityProviderServiceGitHubConfig -from zitadel_client.models.identity_provider_service_git_hub_enterprise_server_config import IdentityProviderServiceGitHubEnterpriseServerConfig -from zitadel_client.models.identity_provider_service_git_lab_config import IdentityProviderServiceGitLabConfig -from zitadel_client.models.identity_provider_service_git_lab_self_hosted_config import IdentityProviderServiceGitLabSelfHostedConfig -from zitadel_client.models.identity_provider_service_google_config import IdentityProviderServiceGoogleConfig -from zitadel_client.models.identity_provider_service_jwt_config import IdentityProviderServiceJWTConfig -from zitadel_client.models.identity_provider_service_ldap_config import IdentityProviderServiceLDAPConfig -from zitadel_client.models.identity_provider_service_o_auth_config import IdentityProviderServiceOAuthConfig -from zitadel_client.models.identity_provider_service_options import IdentityProviderServiceOptions -from zitadel_client.models.identity_provider_service_saml_config import IdentityProviderServiceSAMLConfig -from typing import Optional, Set -from typing_extensions import Self +IDENTITYPROVIDERSERVICEIDPCONFIG_ONE_OF_SCHEMAS = ["Apple", "AzureAd", "Github", "GithubEs", "Gitlab", "GitlabSelfHosted", "Google", "Jwt", "Ldap", "Oauth", "Oidc", "Saml"] class IdentityProviderServiceIDPConfig(BaseModel): """ IdentityProviderServiceIDPConfig - """ # noqa: E501 - options: Optional[IdentityProviderServiceOptions] = None - ldap: Optional[IdentityProviderServiceLDAPConfig] = None - google: Optional[IdentityProviderServiceGoogleConfig] = None - oauth: Optional[IdentityProviderServiceOAuthConfig] = None - oidc: Optional[IdentityProviderServiceGenericOIDCConfig] = None - jwt: Optional[IdentityProviderServiceJWTConfig] = None - github: Optional[IdentityProviderServiceGitHubConfig] = None - github_es: Optional[IdentityProviderServiceGitHubEnterpriseServerConfig] = Field(default=None, alias="githubEs") - gitlab: Optional[IdentityProviderServiceGitLabConfig] = None - gitlab_self_hosted: Optional[IdentityProviderServiceGitLabSelfHostedConfig] = Field(default=None, alias="gitlabSelfHosted") - azure_ad: Optional[IdentityProviderServiceAzureADConfig] = Field(default=None, alias="azureAd") - apple: Optional[IdentityProviderServiceAppleConfig] = None - saml: Optional[IdentityProviderServiceSAMLConfig] = None + """ + # data type: Apple + oneof_schema_1_validator: Optional[Apple] = None + # data type: AzureAd + oneof_schema_2_validator: Optional[AzureAd] = None + # data type: Github + oneof_schema_3_validator: Optional[Github] = None + # data type: GithubEs + oneof_schema_4_validator: Optional[GithubEs] = None + # data type: Gitlab + oneof_schema_5_validator: Optional[Gitlab] = None + # data type: GitlabSelfHosted + oneof_schema_6_validator: Optional[GitlabSelfHosted] = None + # data type: Google + oneof_schema_7_validator: Optional[Google] = None + # data type: Jwt + oneof_schema_8_validator: Optional[Jwt] = None + # data type: Ldap + oneof_schema_9_validator: Optional[Ldap] = None + # data type: Oauth + oneof_schema_10_validator: Optional[Oauth] = None + # data type: Oidc + oneof_schema_11_validator: Optional[Oidc] = None + # data type: Saml + oneof_schema_12_validator: Optional[Saml] = None + actual_instance: Optional[Union[Apple, AzureAd, Github, GithubEs, Gitlab, GitlabSelfHosted, Google, Jwt, Ldap, Oauth, Oidc, Saml]] = None + one_of_schemas: Set[str] = { "Apple", "AzureAd", "Github", "GithubEs", "Gitlab", "GitlabSelfHosted", "Google", "Jwt", "Ldap", "Oauth", "Oidc", "Saml" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = IdentityProviderServiceIDPConfig.model_construct() + error_messages = [] + match = 0 + # validate data type: Apple + if not isinstance(v, Apple): + error_messages.append(f"Error! Input type `{type(v)}` is not `Apple`") + else: + match += 1 + # validate data type: AzureAd + if not isinstance(v, AzureAd): + error_messages.append(f"Error! Input type `{type(v)}` is not `AzureAd`") + else: + match += 1 + # validate data type: Github + if not isinstance(v, Github): + error_messages.append(f"Error! Input type `{type(v)}` is not `Github`") + else: + match += 1 + # validate data type: GithubEs + if not isinstance(v, GithubEs): + error_messages.append(f"Error! Input type `{type(v)}` is not `GithubEs`") + else: + match += 1 + # validate data type: Gitlab + if not isinstance(v, Gitlab): + error_messages.append(f"Error! Input type `{type(v)}` is not `Gitlab`") + else: + match += 1 + # validate data type: GitlabSelfHosted + if not isinstance(v, GitlabSelfHosted): + error_messages.append(f"Error! Input type `{type(v)}` is not `GitlabSelfHosted`") + else: + match += 1 + # validate data type: Google + if not isinstance(v, Google): + error_messages.append(f"Error! Input type `{type(v)}` is not `Google`") + else: + match += 1 + # validate data type: Jwt + if not isinstance(v, Jwt): + error_messages.append(f"Error! Input type `{type(v)}` is not `Jwt`") + else: + match += 1 + # validate data type: Ldap + if not isinstance(v, Ldap): + error_messages.append(f"Error! Input type `{type(v)}` is not `Ldap`") + else: + match += 1 + # validate data type: Oauth + if not isinstance(v, Oauth): + error_messages.append(f"Error! Input type `{type(v)}` is not `Oauth`") + else: + match += 1 + # validate data type: Oidc + if not isinstance(v, Oidc): + error_messages.append(f"Error! Input type `{type(v)}` is not `Oidc`") + else: + match += 1 + # validate data type: Saml + if not isinstance(v, Saml): + error_messages.append(f"Error! Input type `{type(v)}` is not `Saml`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in IdentityProviderServiceIDPConfig with oneOf schemas: Apple, AzureAd, Github, GithubEs, Gitlab, GitlabSelfHosted, Google, Jwt, Ldap, Oauth, Oidc, Saml. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in IdentityProviderServiceIDPConfig with oneOf schemas: Apple, AzureAd, Github, GithubEs, Gitlab, GitlabSelfHosted, Google, Jwt, Ldap, Oauth, Oidc, Saml. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of IdentityProviderServiceIDPConfig from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of IdentityProviderServiceIDPConfig from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Apple + try: + instance.actual_instance = Apple.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AzureAd + try: + instance.actual_instance = AzureAd.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Github + try: + instance.actual_instance = Github.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into GithubEs + try: + instance.actual_instance = GithubEs.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Gitlab + try: + instance.actual_instance = Gitlab.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into GitlabSelfHosted + try: + instance.actual_instance = GitlabSelfHosted.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Google + try: + instance.actual_instance = Google.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Jwt + try: + instance.actual_instance = Jwt.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Ldap + try: + instance.actual_instance = Ldap.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Oauth + try: + instance.actual_instance = Oauth.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Oidc + try: + instance.actual_instance = Oidc.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Saml + try: + instance.actual_instance = Saml.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into IdentityProviderServiceIDPConfig with oneOf schemas: Apple, AzureAd, Github, GithubEs, Gitlab, GitlabSelfHosted, Google, Jwt, Ldap, Oauth, Oidc, Saml. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into IdentityProviderServiceIDPConfig with oneOf schemas: Apple, AzureAd, Github, GithubEs, Gitlab, GitlabSelfHosted, Google, Jwt, Ldap, Oauth, Oidc, Saml. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Apple, AzureAd, Github, GithubEs, Gitlab, GitlabSelfHosted, Google, Jwt, Ldap, Oauth, Oidc, Saml]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - 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 - }) - return _obj + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/identity_provider_service_jwt_config.py b/zitadel_client/models/identity_provider_service_jwt_config.py index 8680c496..eb18b06c 100644 --- a/zitadel_client/models/identity_provider_service_jwt_config.py +++ b/zitadel_client/models/identity_provider_service_jwt_config.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/identity_provider_service_ldap_attributes.py b/zitadel_client/models/identity_provider_service_ldap_attributes.py index c8477123..a569cade 100644 --- a/zitadel_client/models/identity_provider_service_ldap_attributes.py +++ b/zitadel_client/models/identity_provider_service_ldap_attributes.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/identity_provider_service_ldap_config.py b/zitadel_client/models/identity_provider_service_ldap_config.py index 51215e5d..1f9a26b0 100644 --- a/zitadel_client/models/identity_provider_service_ldap_config.py +++ b/zitadel_client/models/identity_provider_service_ldap_config.py @@ -34,7 +34,7 @@ class IdentityProviderServiceLDAPConfig(BaseModel): user_base: Optional[StrictStr] = Field(default=None, alias="userBase") user_object_classes: Optional[List[StrictStr]] = Field(default=None, alias="userObjectClasses") user_filters: Optional[List[StrictStr]] = Field(default=None, alias="userFilters") - timeout: Optional[StrictStr] = None + timeout: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") attributes: Optional[IdentityProviderServiceLDAPAttributes] = None root_ca: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, alias="rootCa") 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..74c0d3ad 100644 --- a/zitadel_client/models/identity_provider_service_o_auth_config.py +++ b/zitadel_client/models/identity_provider_service_o_auth_config.py @@ -30,8 +30,8 @@ class IdentityProviderServiceOAuthConfig(BaseModel): authorization_endpoint: Optional[StrictStr] = Field(default=None, description="The endpoint where ZITADEL send the user to authenticate.", alias="authorizationEndpoint") token_endpoint: Optional[StrictStr] = Field(default=None, description="The endpoint where ZITADEL can get the token.", alias="tokenEndpoint") 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") + 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") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_options.py b/zitadel_client/models/identity_provider_service_options.py index 4e921e4f..a68bf0f8 100644 --- a/zitadel_client/models/identity_provider_service_options.py +++ b/zitadel_client/models/identity_provider_service_options.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.identity_provider_service_auto_linking_option import IdentityProviderServiceAutoLinkingOption from typing import Optional, Set from typing_extensions import Self @@ -27,11 +27,11 @@ class IdentityProviderServiceOptions(BaseModel): """ IdentityProviderServiceOptions """ # noqa: E501 - is_linking_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to link an existing ZITADEL user with an external account.", alias="isLinkingAllowed") - is_creation_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to create a new account in ZITADEL when using an external account.", alias="isCreationAllowed") - 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") + is_linking_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to link an existing ZITADEL user with an external account.", alias="isLinkingAllowed") + is_creation_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to create a new account in ZITADEL when using an external account.", alias="isCreationAllowed") + 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=None, alias="autoLinking") model_config = ConfigDict( populate_by_name=True, @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isCreationAllowed": obj.get("isCreationAllowed"), "isAutoCreation": obj.get("isAutoCreation"), "isAutoUpdate": obj.get("isAutoUpdate"), - "autoLinking": obj.get("autoLinking") if obj.get("autoLinking") is not None else IdentityProviderServiceAutoLinkingOption.AUTO_LINKING_OPTION_UNSPECIFIED + "autoLinking": obj.get("autoLinking") }) 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..2b8722c3 100644 --- a/zitadel_client/models/identity_provider_service_saml_config.py +++ b/zitadel_client/models/identity_provider_service_saml_config.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, Optional, Union from zitadel_client.models.identity_provider_service_saml_binding import IdentityProviderServiceSAMLBinding from zitadel_client.models.identity_provider_service_saml_name_id_format import IdentityProviderServiceSAMLNameIDFormat from typing import Optional, Set @@ -29,11 +29,11 @@ class IdentityProviderServiceSAMLConfig(BaseModel): IdentityProviderServiceSAMLConfig """ # noqa: E501 metadata_xml: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="Metadata of the SAML identity provider.", alias="metadataXml") - binding: Optional[IdentityProviderServiceSAMLBinding] = IdentityProviderServiceSAMLBinding.SAML_BINDING_UNSPECIFIED + binding: Optional[IdentityProviderServiceSAMLBinding] = None with_signed_request: Optional[StrictBool] = Field(default=None, description="Boolean which defines if the authentication requests are signed.", alias="withSignedRequest") - 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") + name_id_format: Optional[IdentityProviderServiceSAMLNameIDFormat] = Field(default=None, 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") model_config = ConfigDict( populate_by_name=True, @@ -74,6 +74,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if transient_mapping_attribute_name (nullable) is None + # and model_fields_set contains the field + if self.transient_mapping_attribute_name is None and "transient_mapping_attribute_name" in self.model_fields_set: + _dict['transientMappingAttributeName'] = None + + # set to None if federated_logout_enabled (nullable) is None + # and model_fields_set contains the field + if self.federated_logout_enabled is None and "federated_logout_enabled" in self.model_fields_set: + _dict['federatedLogoutEnabled'] = None + return _dict @classmethod @@ -87,9 +97,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "metadataXml": obj.get("metadataXml"), - "binding": obj.get("binding") if obj.get("binding") is not None else IdentityProviderServiceSAMLBinding.SAML_BINDING_UNSPECIFIED, + "binding": obj.get("binding"), "withSignedRequest": obj.get("withSignedRequest"), - "nameIdFormat": obj.get("nameIdFormat") if obj.get("nameIdFormat") is not None else IdentityProviderServiceSAMLNameIDFormat.SAML_NAME_ID_FORMAT_UNSPECIFIED, + "nameIdFormat": obj.get("nameIdFormat"), "transientMappingAttributeName": obj.get("transientMappingAttributeName"), "federatedLogoutEnabled": obj.get("federatedLogoutEnabled") }) diff --git a/zitadel_client/models/idp_intent.py b/zitadel_client/models/idp_intent.py new file mode 100644 index 00000000..8f54e325 --- /dev/null +++ b/zitadel_client/models/idp_intent.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_idp_intent import UserServiceIDPIntent +from typing import Optional, Set +from typing_extensions import Self + +class IdpIntent(BaseModel): + """ + IdpIntent + """ # noqa: E501 + idp_intent: UserServiceIDPIntent = Field(alias="idpIntent") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdpIntent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of idp_intent + if self.idp_intent: + _dict['idpIntent'] = self.idp_intent.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdpIntent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idpIntent": UserServiceIDPIntent.from_dict(obj["idpIntent"]) if obj.get("idpIntent") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/idp_intent1.py b/zitadel_client/models/idp_intent1.py new file mode 100644 index 00000000..65d4e77b --- /dev/null +++ b/zitadel_client/models/idp_intent1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_idp_intent import BetaUserServiceIDPIntent +from typing import Optional, Set +from typing_extensions import Self + +class IdpIntent1(BaseModel): + """ + IdpIntent1 + """ # noqa: E501 + idp_intent: BetaUserServiceIDPIntent = Field(alias="idpIntent") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdpIntent1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of idp_intent + if self.idp_intent: + _dict['idpIntent'] = self.idp_intent.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdpIntent1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idpIntent": BetaUserServiceIDPIntent.from_dict(obj["idpIntent"]) if obj.get("idpIntent") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/ids_query.py b/zitadel_client/models/ids_query.py new file mode 100644 index 00000000..3ed35acf --- /dev/null +++ b/zitadel_client/models/ids_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_session_service_ids_query import BetaSessionServiceIDsQuery +from typing import Optional, Set +from typing_extensions import Self + +class IdsQuery(BaseModel): + """ + IdsQuery + """ # noqa: E501 + ids_query: BetaSessionServiceIDsQuery = Field(alias="idsQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdsQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ids_query + if self.ids_query: + _dict['idsQuery'] = self.ids_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdsQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idsQuery": BetaSessionServiceIDsQuery.from_dict(obj["idsQuery"]) if obj.get("idsQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/ids_query1.py b/zitadel_client/models/ids_query1.py new file mode 100644 index 00000000..0cba364e --- /dev/null +++ b/zitadel_client/models/ids_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.session_service_ids_query import SessionServiceIDsQuery +from typing import Optional, Set +from typing_extensions import Self + +class IdsQuery1(BaseModel): + """ + IdsQuery1 + """ # noqa: E501 + ids_query: SessionServiceIDsQuery = Field(alias="idsQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdsQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ids_query + if self.ids_query: + _dict['idsQuery'] = self.ids_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdsQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idsQuery": SessionServiceIDsQuery.from_dict(obj["idsQuery"]) if obj.get("idsQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/in_conditions_filter.py b/zitadel_client/models/in_conditions_filter.py new file mode 100644 index 00000000..00118723 --- /dev/null +++ b/zitadel_client/models/in_conditions_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_action_service_in_conditions_filter import BetaActionServiceInConditionsFilter +from typing import Optional, Set +from typing_extensions import Self + +class InConditionsFilter(BaseModel): + """ + InConditionsFilter + """ # noqa: E501 + in_conditions_filter: BetaActionServiceInConditionsFilter = Field(alias="inConditionsFilter") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InConditionsFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of in_conditions_filter + if self.in_conditions_filter: + _dict['inConditionsFilter'] = self.in_conditions_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InConditionsFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inConditionsFilter": BetaActionServiceInConditionsFilter.from_dict(obj["inConditionsFilter"]) if obj.get("inConditionsFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/in_target_ids_filter.py b/zitadel_client/models/in_target_ids_filter.py new file mode 100644 index 00000000..2382b368 --- /dev/null +++ b/zitadel_client/models/in_target_ids_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_action_service_in_target_ids_filter import BetaActionServiceInTargetIDsFilter +from typing import Optional, Set +from typing_extensions import Self + +class InTargetIdsFilter(BaseModel): + """ + InTargetIdsFilter + """ # noqa: E501 + in_target_ids_filter: BetaActionServiceInTargetIDsFilter = Field(alias="inTargetIdsFilter") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InTargetIdsFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of in_target_ids_filter + if self.in_target_ids_filter: + _dict['inTargetIdsFilter'] = self.in_target_ids_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InTargetIdsFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inTargetIdsFilter": BetaActionServiceInTargetIDsFilter.from_dict(obj["inTargetIdsFilter"]) if obj.get("inTargetIdsFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/in_user_emails_query.py b/zitadel_client/models/in_user_emails_query.py new file mode 100644 index 00000000..30183557 --- /dev/null +++ b/zitadel_client/models/in_user_emails_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_in_user_emails_query import UserServiceInUserEmailsQuery +from typing import Optional, Set +from typing_extensions import Self + +class InUserEmailsQuery(BaseModel): + """ + InUserEmailsQuery + """ # noqa: E501 + in_user_emails_query: UserServiceInUserEmailsQuery = Field(alias="inUserEmailsQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InUserEmailsQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of in_user_emails_query + if self.in_user_emails_query: + _dict['inUserEmailsQuery'] = self.in_user_emails_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InUserEmailsQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inUserEmailsQuery": UserServiceInUserEmailsQuery.from_dict(obj["inUserEmailsQuery"]) if obj.get("inUserEmailsQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/in_user_emails_query1.py b/zitadel_client/models/in_user_emails_query1.py new file mode 100644 index 00000000..064f3d10 --- /dev/null +++ b/zitadel_client/models/in_user_emails_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_in_user_emails_query import BetaUserServiceInUserEmailsQuery +from typing import Optional, Set +from typing_extensions import Self + +class InUserEmailsQuery1(BaseModel): + """ + InUserEmailsQuery1 + """ # noqa: E501 + in_user_emails_query: BetaUserServiceInUserEmailsQuery = Field(alias="inUserEmailsQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InUserEmailsQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of in_user_emails_query + if self.in_user_emails_query: + _dict['inUserEmailsQuery'] = self.in_user_emails_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InUserEmailsQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inUserEmailsQuery": BetaUserServiceInUserEmailsQuery.from_dict(obj["inUserEmailsQuery"]) if obj.get("inUserEmailsQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/in_user_ids_query.py b/zitadel_client/models/in_user_ids_query.py new file mode 100644 index 00000000..186c0bf6 --- /dev/null +++ b/zitadel_client/models/in_user_ids_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_in_user_id_query import UserServiceInUserIDQuery +from typing import Optional, Set +from typing_extensions import Self + +class InUserIdsQuery(BaseModel): + """ + InUserIdsQuery + """ # noqa: E501 + in_user_ids_query: UserServiceInUserIDQuery = Field(alias="inUserIdsQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InUserIdsQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of in_user_ids_query + if self.in_user_ids_query: + _dict['inUserIdsQuery'] = self.in_user_ids_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InUserIdsQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inUserIdsQuery": UserServiceInUserIDQuery.from_dict(obj["inUserIdsQuery"]) if obj.get("inUserIdsQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/in_user_ids_query1.py b/zitadel_client/models/in_user_ids_query1.py new file mode 100644 index 00000000..8442a31e --- /dev/null +++ b/zitadel_client/models/in_user_ids_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_in_user_id_query import BetaUserServiceInUserIDQuery +from typing import Optional, Set +from typing_extensions import Self + +class InUserIdsQuery1(BaseModel): + """ + InUserIdsQuery1 + """ # noqa: E501 + in_user_ids_query: BetaUserServiceInUserIDQuery = Field(alias="inUserIdsQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InUserIdsQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of in_user_ids_query + if self.in_user_ids_query: + _dict['inUserIdsQuery'] = self.in_user_ids_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InUserIdsQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inUserIdsQuery": BetaUserServiceInUserIDQuery.from_dict(obj["inUserIdsQuery"]) if obj.get("inUserIdsQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/instance.py b/zitadel_client/models/instance.py new file mode 100644 index 00000000..7f3e8399 --- /dev/null +++ b/zitadel_client/models/instance.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Instance(BaseModel): + """ + Instance + """ # noqa: E501 + instance: StrictBool + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Instance from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Instance from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance": obj.get("instance") + }) + return _obj + + diff --git a/zitadel_client/models/is_verified.py b/zitadel_client/models/is_verified.py new file mode 100644 index 00000000..f36b84ae --- /dev/null +++ b/zitadel_client/models/is_verified.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class IsVerified(BaseModel): + """ + IsVerified + """ # noqa: E501 + is_verified: StrictBool = Field(alias="isVerified") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IsVerified from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IsVerified from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "isVerified": obj.get("isVerified") + }) + return _obj + + diff --git a/zitadel_client/models/jwt.py b/zitadel_client/models/jwt.py new file mode 100644 index 00000000..61f4615c --- /dev/null +++ b/zitadel_client/models/jwt.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.identity_provider_service_jwt_config import IdentityProviderServiceJWTConfig +from typing import Optional, Set +from typing_extensions import Self + +class Jwt(BaseModel): + """ + Jwt + """ # noqa: E501 + jwt: IdentityProviderServiceJWTConfig + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Jwt from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of jwt + if self.jwt: + _dict['jwt'] = self.jwt.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Jwt from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "jwt": IdentityProviderServiceJWTConfig.from_dict(obj["jwt"]) if obj.get("jwt") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/last_name_query.py b/zitadel_client/models/last_name_query.py new file mode 100644 index 00000000..a55e0a3b --- /dev/null +++ b/zitadel_client/models/last_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_last_name_query import UserServiceLastNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class LastNameQuery(BaseModel): + """ + LastNameQuery + """ # noqa: E501 + last_name_query: UserServiceLastNameQuery = Field(alias="lastNameQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LastNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of last_name_query + if self.last_name_query: + _dict['lastNameQuery'] = self.last_name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LastNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "lastNameQuery": UserServiceLastNameQuery.from_dict(obj["lastNameQuery"]) if obj.get("lastNameQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/last_name_query1.py b/zitadel_client/models/last_name_query1.py new file mode 100644 index 00000000..898927a2 --- /dev/null +++ b/zitadel_client/models/last_name_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_last_name_query import BetaUserServiceLastNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class LastNameQuery1(BaseModel): + """ + LastNameQuery1 + """ # noqa: E501 + last_name_query: BetaUserServiceLastNameQuery = Field(alias="lastNameQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LastNameQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of last_name_query + if self.last_name_query: + _dict['lastNameQuery'] = self.last_name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LastNameQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "lastNameQuery": BetaUserServiceLastNameQuery.from_dict(obj["lastNameQuery"]) if obj.get("lastNameQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/ldap.py b/zitadel_client/models/ldap.py new file mode 100644 index 00000000..6f61afb7 --- /dev/null +++ b/zitadel_client/models/ldap.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.identity_provider_service_ldap_config import IdentityProviderServiceLDAPConfig +from typing import Optional, Set +from typing_extensions import Self + +class Ldap(BaseModel): + """ + Ldap + """ # noqa: E501 + ldap: IdentityProviderServiceLDAPConfig + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Ldap from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ldap + if self.ldap: + _dict['ldap'] = self.ldap.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Ldap from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ldap": IdentityProviderServiceLDAPConfig.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/ldap1.py b/zitadel_client/models/ldap1.py new file mode 100644 index 00000000..c8a3379d --- /dev/null +++ b/zitadel_client/models/ldap1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_ldap_credentials import UserServiceLDAPCredentials +from typing import Optional, Set +from typing_extensions import Self + +class Ldap1(BaseModel): + """ + Ldap1 + """ # noqa: E501 + ldap: UserServiceLDAPCredentials + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Ldap1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ldap + if self.ldap: + _dict['ldap'] = self.ldap.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Ldap1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ldap": UserServiceLDAPCredentials.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/ldap2.py b/zitadel_client/models/ldap2.py new file mode 100644 index 00000000..d617d197 --- /dev/null +++ b/zitadel_client/models/ldap2.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_idpldap_access_information import UserServiceIDPLDAPAccessInformation +from typing import Optional, Set +from typing_extensions import Self + +class Ldap2(BaseModel): + """ + Ldap2 + """ # noqa: E501 + ldap: UserServiceIDPLDAPAccessInformation + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Ldap2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ldap + if self.ldap: + _dict['ldap'] = self.ldap.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Ldap2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ldap": UserServiceIDPLDAPAccessInformation.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/ldap3.py b/zitadel_client/models/ldap3.py new file mode 100644 index 00000000..454bfb1e --- /dev/null +++ b/zitadel_client/models/ldap3.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_ldap_credentials import BetaUserServiceLDAPCredentials +from typing import Optional, Set +from typing_extensions import Self + +class Ldap3(BaseModel): + """ + Ldap3 + """ # noqa: E501 + ldap: BetaUserServiceLDAPCredentials + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Ldap3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ldap + if self.ldap: + _dict['ldap'] = self.ldap.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Ldap3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ldap": BetaUserServiceLDAPCredentials.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/ldap4.py b/zitadel_client/models/ldap4.py new file mode 100644 index 00000000..1178b801 --- /dev/null +++ b/zitadel_client/models/ldap4.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_idpldap_access_information import BetaUserServiceIDPLDAPAccessInformation +from typing import Optional, Set +from typing_extensions import Self + +class Ldap4(BaseModel): + """ + Ldap4 + """ # noqa: E501 + ldap: BetaUserServiceIDPLDAPAccessInformation + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Ldap4 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ldap + if self.ldap: + _dict['ldap'] = self.ldap.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Ldap4 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ldap": BetaUserServiceIDPLDAPAccessInformation.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/login_name.py b/zitadel_client/models/login_name.py new file mode 100644 index 00000000..8fc49633 --- /dev/null +++ b/zitadel_client/models/login_name.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class LoginName(BaseModel): + """ + LoginName + """ # noqa: E501 + login_name: StrictStr = Field(alias="loginName") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginName from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoginName from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginName": obj.get("loginName") + }) + return _obj + + diff --git a/zitadel_client/models/login_name_query.py b/zitadel_client/models/login_name_query.py new file mode 100644 index 00000000..f331621d --- /dev/null +++ b/zitadel_client/models/login_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_login_name_query import UserServiceLoginNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class LoginNameQuery(BaseModel): + """ + LoginNameQuery + """ # noqa: E501 + login_name_query: UserServiceLoginNameQuery = Field(alias="loginNameQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of login_name_query + if self.login_name_query: + _dict['loginNameQuery'] = self.login_name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoginNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginNameQuery": UserServiceLoginNameQuery.from_dict(obj["loginNameQuery"]) if obj.get("loginNameQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/login_name_query1.py b/zitadel_client/models/login_name_query1.py new file mode 100644 index 00000000..afb516a7 --- /dev/null +++ b/zitadel_client/models/login_name_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_login_name_query import BetaUserServiceLoginNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class LoginNameQuery1(BaseModel): + """ + LoginNameQuery1 + """ # noqa: E501 + login_name_query: BetaUserServiceLoginNameQuery = Field(alias="loginNameQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginNameQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of login_name_query + if self.login_name_query: + _dict['loginNameQuery'] = self.login_name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoginNameQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginNameQuery": BetaUserServiceLoginNameQuery.from_dict(obj["loginNameQuery"]) if obj.get("loginNameQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/machine.py b/zitadel_client/models/machine.py new file mode 100644 index 00000000..44a38715 --- /dev/null +++ b/zitadel_client/models/machine.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_machine_user import UserServiceMachineUser +from typing import Optional, Set +from typing_extensions import Self + +class Machine(BaseModel): + """ + Machine + """ # noqa: E501 + machine: UserServiceMachineUser + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Machine from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of machine + if self.machine: + _dict['machine'] = self.machine.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Machine from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "machine": UserServiceMachineUser.from_dict(obj["machine"]) if obj.get("machine") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/machine1.py b/zitadel_client/models/machine1.py new file mode 100644 index 00000000..685d75b9 --- /dev/null +++ b/zitadel_client/models/machine1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_machine_user import BetaUserServiceMachineUser +from typing import Optional, Set +from typing_extensions import Self + +class Machine1(BaseModel): + """ + Machine1 + """ # noqa: E501 + machine: BetaUserServiceMachineUser + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Machine1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of machine + if self.machine: + _dict['machine'] = self.machine.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Machine1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "machine": BetaUserServiceMachineUser.from_dict(obj["machine"]) if obj.get("machine") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_protobuf_any.py b/zitadel_client/models/method.py similarity index 87% rename from zitadel_client/models/action_service_protobuf_any.py rename to zitadel_client/models/method.py index 61fa28f2..7a7409af 100644 --- a/zitadel_client/models/action_service_protobuf_any.py +++ b/zitadel_client/models/method.py @@ -18,15 +18,15 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class ActionServiceProtobufAny(BaseModel): +class Method(BaseModel): """ - ActionServiceProtobufAny + Method """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + method: StrictStr = Field(description="GRPC-method as condition.") model_config = ConfigDict( populate_by_name=True, @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceProtobufAny from a JSON string""" + """Create an instance of Method from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceProtobufAny from a dict""" + """Create an instance of Method from a dict""" if obj is None: return None @@ -79,7 +79,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/name_query.py b/zitadel_client/models/name_query.py new file mode 100644 index 00000000..62ca7a4b --- /dev/null +++ b/zitadel_client/models/name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.organization_service_organization_name_query import OrganizationServiceOrganizationNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class NameQuery(BaseModel): + """ + NameQuery + """ # noqa: E501 + name_query: OrganizationServiceOrganizationNameQuery = Field(alias="nameQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of name_query + if self.name_query: + _dict['nameQuery'] = self.name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "nameQuery": OrganizationServiceOrganizationNameQuery.from_dict(obj["nameQuery"]) if obj.get("nameQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/nick_name_query.py b/zitadel_client/models/nick_name_query.py new file mode 100644 index 00000000..0361f17f --- /dev/null +++ b/zitadel_client/models/nick_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_nick_name_query import UserServiceNickNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class NickNameQuery(BaseModel): + """ + NickNameQuery + """ # noqa: E501 + nick_name_query: UserServiceNickNameQuery = Field(alias="nickNameQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NickNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of nick_name_query + if self.nick_name_query: + _dict['nickNameQuery'] = self.nick_name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NickNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "nickNameQuery": UserServiceNickNameQuery.from_dict(obj["nickNameQuery"]) if obj.get("nickNameQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/nick_name_query1.py b/zitadel_client/models/nick_name_query1.py new file mode 100644 index 00000000..6539ffa4 --- /dev/null +++ b/zitadel_client/models/nick_name_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_nick_name_query import BetaUserServiceNickNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class NickNameQuery1(BaseModel): + """ + NickNameQuery1 + """ # noqa: E501 + nick_name_query: BetaUserServiceNickNameQuery = Field(alias="nickNameQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NickNameQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of nick_name_query + if self.nick_name_query: + _dict['nickNameQuery'] = self.nick_name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NickNameQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "nickNameQuery": BetaUserServiceNickNameQuery.from_dict(obj["nickNameQuery"]) if obj.get("nickNameQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/no_op200_response.py b/zitadel_client/models/no_op200_response.py new file mode 100644 index 00000000..e5b3a525 --- /dev/null +++ b/zitadel_client/models/no_op200_response.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.identity_provider_service_apple_config import IdentityProviderServiceAppleConfig +from zitadel_client.models.identity_provider_service_azure_ad_config import IdentityProviderServiceAzureADConfig +from zitadel_client.models.identity_provider_service_azure_ad_tenant_type import IdentityProviderServiceAzureADTenantType +from zitadel_client.models.identity_provider_service_generic_oidc_config import IdentityProviderServiceGenericOIDCConfig +from zitadel_client.models.identity_provider_service_git_hub_config import IdentityProviderServiceGitHubConfig +from zitadel_client.models.identity_provider_service_git_hub_enterprise_server_config import IdentityProviderServiceGitHubEnterpriseServerConfig +from zitadel_client.models.identity_provider_service_git_lab_config import IdentityProviderServiceGitLabConfig +from zitadel_client.models.identity_provider_service_git_lab_self_hosted_config import IdentityProviderServiceGitLabSelfHostedConfig +from zitadel_client.models.identity_provider_service_google_config import IdentityProviderServiceGoogleConfig +from zitadel_client.models.identity_provider_service_jwt_config import IdentityProviderServiceJWTConfig +from zitadel_client.models.identity_provider_service_ldap_config import IdentityProviderServiceLDAPConfig +from zitadel_client.models.identity_provider_service_o_auth_config import IdentityProviderServiceOAuthConfig +from zitadel_client.models.identity_provider_service_saml_config import IdentityProviderServiceSAMLConfig +from typing import Optional, Set +from typing_extensions import Self + +class NoOp200Response(BaseModel): + """ + NoOp200Response + """ # noqa: E501 + var_8441420f_0f12_4dcb_850c_018df092eac6: Optional[IdentityProviderServiceAppleConfig] = Field(default=None, alias="8441420f-0f12-4dcb-850c-018df092eac6") + c649d0dc_722e_4d8f_a9d5_b66697477bdf: Optional[IdentityProviderServiceAzureADConfig] = Field(default=None, alias="c649d0dc-722e-4d8f-a9d5-b66697477bdf") + a8fc9e9c_1722_45ea_b1db_d8d488cb7a73: Optional[IdentityProviderServiceAzureADTenantType] = Field(default=None, alias="a8fc9e9c-1722-45ea-b1db-d8d488cb7a73") + var_4a6eecea_4e11_4448_99a7_e62eacf0f00e: Optional[IdentityProviderServiceGenericOIDCConfig] = Field(default=None, alias="4a6eecea-4e11-4448-99a7-e62eacf0f00e") + d003c137_9066_4dab_b87a_f427f3569ecb: Optional[IdentityProviderServiceGitHubConfig] = Field(default=None, alias="d003c137-9066-4dab-b87a-f427f3569ecb") + var_0b5bc982_57a1_495e_a25d_7774c0ada464: Optional[IdentityProviderServiceGitHubEnterpriseServerConfig] = Field(default=None, alias="0b5bc982-57a1-495e-a25d-7774c0ada464") + aa233ae4_8316_4f3d_90c4_2355713c7829: Optional[IdentityProviderServiceGitLabConfig] = Field(default=None, alias="aa233ae4-8316-4f3d-90c4-2355713c7829") + var_6b121e92_2e75_4bb6_ae63_79465b115116: Optional[IdentityProviderServiceGitLabSelfHostedConfig] = Field(default=None, alias="6b121e92-2e75-4bb6-ae63-79465b115116") + d46c89de_23af_4ee4_9f8c_1af4e3f807ad: Optional[IdentityProviderServiceGoogleConfig] = Field(default=None, alias="d46c89de-23af-4ee4-9f8c-1af4e3f807ad") + e67c5d6b_04fe_448a_87f1_51211266e6a2: Optional[IdentityProviderServiceJWTConfig] = Field(default=None, alias="e67c5d6b-04fe-448a-87f1-51211266e6a2") + fbb8d0c3_45bc_4c00_a78e_0b09da1dd662: Optional[IdentityProviderServiceLDAPConfig] = Field(default=None, alias="fbb8d0c3-45bc-4c00-a78e-0b09da1dd662") + dc49af89_1cfc_4f1c_b6ab_5b4a49223de2: Optional[IdentityProviderServiceOAuthConfig] = Field(default=None, alias="dc49af89-1cfc-4f1c-b6ab-5b4a49223de2") + c14fad73_15be_46c8_9763_7f7e5c31379c: Optional[IdentityProviderServiceSAMLConfig] = Field(default=None, alias="c14fad73-15be-46c8-9763-7f7e5c31379c") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NoOp200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_8441420f_0f12_4dcb_850c_018df092eac6 + if self.var_8441420f_0f12_4dcb_850c_018df092eac6: + _dict['8441420f-0f12-4dcb-850c-018df092eac6'] = self.var_8441420f_0f12_4dcb_850c_018df092eac6.to_dict() + # override the default output from pydantic by calling `to_dict()` of c649d0dc_722e_4d8f_a9d5_b66697477bdf + if self.c649d0dc_722e_4d8f_a9d5_b66697477bdf: + _dict['c649d0dc-722e-4d8f-a9d5-b66697477bdf'] = self.c649d0dc_722e_4d8f_a9d5_b66697477bdf.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_4a6eecea_4e11_4448_99a7_e62eacf0f00e + if self.var_4a6eecea_4e11_4448_99a7_e62eacf0f00e: + _dict['4a6eecea-4e11-4448-99a7-e62eacf0f00e'] = self.var_4a6eecea_4e11_4448_99a7_e62eacf0f00e.to_dict() + # override the default output from pydantic by calling `to_dict()` of d003c137_9066_4dab_b87a_f427f3569ecb + if self.d003c137_9066_4dab_b87a_f427f3569ecb: + _dict['d003c137-9066-4dab-b87a-f427f3569ecb'] = self.d003c137_9066_4dab_b87a_f427f3569ecb.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_0b5bc982_57a1_495e_a25d_7774c0ada464 + if self.var_0b5bc982_57a1_495e_a25d_7774c0ada464: + _dict['0b5bc982-57a1-495e-a25d-7774c0ada464'] = self.var_0b5bc982_57a1_495e_a25d_7774c0ada464.to_dict() + # override the default output from pydantic by calling `to_dict()` of aa233ae4_8316_4f3d_90c4_2355713c7829 + if self.aa233ae4_8316_4f3d_90c4_2355713c7829: + _dict['aa233ae4-8316-4f3d-90c4-2355713c7829'] = self.aa233ae4_8316_4f3d_90c4_2355713c7829.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_6b121e92_2e75_4bb6_ae63_79465b115116 + if self.var_6b121e92_2e75_4bb6_ae63_79465b115116: + _dict['6b121e92-2e75-4bb6-ae63-79465b115116'] = self.var_6b121e92_2e75_4bb6_ae63_79465b115116.to_dict() + # override the default output from pydantic by calling `to_dict()` of d46c89de_23af_4ee4_9f8c_1af4e3f807ad + if self.d46c89de_23af_4ee4_9f8c_1af4e3f807ad: + _dict['d46c89de-23af-4ee4-9f8c-1af4e3f807ad'] = self.d46c89de_23af_4ee4_9f8c_1af4e3f807ad.to_dict() + # override the default output from pydantic by calling `to_dict()` of e67c5d6b_04fe_448a_87f1_51211266e6a2 + if self.e67c5d6b_04fe_448a_87f1_51211266e6a2: + _dict['e67c5d6b-04fe-448a-87f1-51211266e6a2'] = self.e67c5d6b_04fe_448a_87f1_51211266e6a2.to_dict() + # override the default output from pydantic by calling `to_dict()` of fbb8d0c3_45bc_4c00_a78e_0b09da1dd662 + if self.fbb8d0c3_45bc_4c00_a78e_0b09da1dd662: + _dict['fbb8d0c3-45bc-4c00-a78e-0b09da1dd662'] = self.fbb8d0c3_45bc_4c00_a78e_0b09da1dd662.to_dict() + # override the default output from pydantic by calling `to_dict()` of dc49af89_1cfc_4f1c_b6ab_5b4a49223de2 + if self.dc49af89_1cfc_4f1c_b6ab_5b4a49223de2: + _dict['dc49af89-1cfc-4f1c-b6ab-5b4a49223de2'] = self.dc49af89_1cfc_4f1c_b6ab_5b4a49223de2.to_dict() + # override the default output from pydantic by calling `to_dict()` of c14fad73_15be_46c8_9763_7f7e5c31379c + if self.c14fad73_15be_46c8_9763_7f7e5c31379c: + _dict['c14fad73-15be-46c8-9763-7f7e5c31379c'] = self.c14fad73_15be_46c8_9763_7f7e5c31379c.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NoOp200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "8441420f-0f12-4dcb-850c-018df092eac6": IdentityProviderServiceAppleConfig.from_dict(obj["8441420f-0f12-4dcb-850c-018df092eac6"]) if obj.get("8441420f-0f12-4dcb-850c-018df092eac6") is not None else None, + "c649d0dc-722e-4d8f-a9d5-b66697477bdf": IdentityProviderServiceAzureADConfig.from_dict(obj["c649d0dc-722e-4d8f-a9d5-b66697477bdf"]) if obj.get("c649d0dc-722e-4d8f-a9d5-b66697477bdf") is not None else None, + "a8fc9e9c-1722-45ea-b1db-d8d488cb7a73": obj.get("a8fc9e9c-1722-45ea-b1db-d8d488cb7a73"), + "4a6eecea-4e11-4448-99a7-e62eacf0f00e": IdentityProviderServiceGenericOIDCConfig.from_dict(obj["4a6eecea-4e11-4448-99a7-e62eacf0f00e"]) if obj.get("4a6eecea-4e11-4448-99a7-e62eacf0f00e") is not None else None, + "d003c137-9066-4dab-b87a-f427f3569ecb": IdentityProviderServiceGitHubConfig.from_dict(obj["d003c137-9066-4dab-b87a-f427f3569ecb"]) if obj.get("d003c137-9066-4dab-b87a-f427f3569ecb") is not None else None, + "0b5bc982-57a1-495e-a25d-7774c0ada464": IdentityProviderServiceGitHubEnterpriseServerConfig.from_dict(obj["0b5bc982-57a1-495e-a25d-7774c0ada464"]) if obj.get("0b5bc982-57a1-495e-a25d-7774c0ada464") is not None else None, + "aa233ae4-8316-4f3d-90c4-2355713c7829": IdentityProviderServiceGitLabConfig.from_dict(obj["aa233ae4-8316-4f3d-90c4-2355713c7829"]) if obj.get("aa233ae4-8316-4f3d-90c4-2355713c7829") is not None else None, + "6b121e92-2e75-4bb6-ae63-79465b115116": IdentityProviderServiceGitLabSelfHostedConfig.from_dict(obj["6b121e92-2e75-4bb6-ae63-79465b115116"]) if obj.get("6b121e92-2e75-4bb6-ae63-79465b115116") is not None else None, + "d46c89de-23af-4ee4-9f8c-1af4e3f807ad": IdentityProviderServiceGoogleConfig.from_dict(obj["d46c89de-23af-4ee4-9f8c-1af4e3f807ad"]) if obj.get("d46c89de-23af-4ee4-9f8c-1af4e3f807ad") is not None else None, + "e67c5d6b-04fe-448a-87f1-51211266e6a2": IdentityProviderServiceJWTConfig.from_dict(obj["e67c5d6b-04fe-448a-87f1-51211266e6a2"]) if obj.get("e67c5d6b-04fe-448a-87f1-51211266e6a2") is not None else None, + "fbb8d0c3-45bc-4c00-a78e-0b09da1dd662": IdentityProviderServiceLDAPConfig.from_dict(obj["fbb8d0c3-45bc-4c00-a78e-0b09da1dd662"]) if obj.get("fbb8d0c3-45bc-4c00-a78e-0b09da1dd662") is not None else None, + "dc49af89-1cfc-4f1c-b6ab-5b4a49223de2": IdentityProviderServiceOAuthConfig.from_dict(obj["dc49af89-1cfc-4f1c-b6ab-5b4a49223de2"]) if obj.get("dc49af89-1cfc-4f1c-b6ab-5b4a49223de2") is not None else None, + "c14fad73-15be-46c8-9763-7f7e5c31379c": IdentityProviderServiceSAMLConfig.from_dict(obj["c14fad73-15be-46c8-9763-7f7e5c31379c"]) if obj.get("c14fad73-15be-46c8-9763-7f7e5c31379c") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/no_op200_response1.py b/zitadel_client/models/no_op200_response1.py new file mode 100644 index 00000000..ef001205 --- /dev/null +++ b/zitadel_client/models/no_op200_response1.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_creation_date_query import BetaSessionServiceCreationDateQuery +from zitadel_client.models.beta_session_service_ids_query import BetaSessionServiceIDsQuery +from zitadel_client.models.beta_session_service_send_code import BetaSessionServiceSendCode +from zitadel_client.models.beta_session_service_user_id_query import BetaSessionServiceUserIDQuery +from typing import Optional, Set +from typing_extensions import Self + +class NoOp200Response1(BaseModel): + """ + NoOp200Response1 + """ # noqa: E501 + var_467230a3_405a_4c73_997e_cf4ba5f50864: Optional[BetaSessionServiceCreationDateQuery] = Field(default=None, alias="467230a3-405a-4c73-997e-cf4ba5f50864") + var_2f6dde9d_ca1f_4105_b398_05a2968dde24: Optional[BetaSessionServiceIDsQuery] = Field(default=None, alias="2f6dde9d-ca1f-4105-b398-05a2968dde24") + var_17a12b0d_0ee3_4344_ae96_716aacbeb6f6: Optional[Dict[str, Any]] = Field(default=None, alias="17a12b0d-0ee3-4344-ae96-716aacbeb6f6") + afcfd581_bc9e_419b_8784_b7e60595ed66: Optional[BetaSessionServiceSendCode] = Field(default=None, alias="afcfd581-bc9e-419b-8784-b7e60595ed66") + var_66906b6c_a659_4f82_a989_5a500cbdc203: Optional[BetaSessionServiceUserIDQuery] = Field(default=None, alias="66906b6c-a659-4f82-a989-5a500cbdc203") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NoOp200Response1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_467230a3_405a_4c73_997e_cf4ba5f50864 + if self.var_467230a3_405a_4c73_997e_cf4ba5f50864: + _dict['467230a3-405a-4c73-997e-cf4ba5f50864'] = self.var_467230a3_405a_4c73_997e_cf4ba5f50864.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_2f6dde9d_ca1f_4105_b398_05a2968dde24 + if self.var_2f6dde9d_ca1f_4105_b398_05a2968dde24: + _dict['2f6dde9d-ca1f-4105-b398-05a2968dde24'] = self.var_2f6dde9d_ca1f_4105_b398_05a2968dde24.to_dict() + # override the default output from pydantic by calling `to_dict()` of afcfd581_bc9e_419b_8784_b7e60595ed66 + if self.afcfd581_bc9e_419b_8784_b7e60595ed66: + _dict['afcfd581-bc9e-419b-8784-b7e60595ed66'] = self.afcfd581_bc9e_419b_8784_b7e60595ed66.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_66906b6c_a659_4f82_a989_5a500cbdc203 + if self.var_66906b6c_a659_4f82_a989_5a500cbdc203: + _dict['66906b6c-a659-4f82-a989-5a500cbdc203'] = self.var_66906b6c_a659_4f82_a989_5a500cbdc203.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NoOp200Response1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "467230a3-405a-4c73-997e-cf4ba5f50864": BetaSessionServiceCreationDateQuery.from_dict(obj["467230a3-405a-4c73-997e-cf4ba5f50864"]) if obj.get("467230a3-405a-4c73-997e-cf4ba5f50864") is not None else None, + "2f6dde9d-ca1f-4105-b398-05a2968dde24": BetaSessionServiceIDsQuery.from_dict(obj["2f6dde9d-ca1f-4105-b398-05a2968dde24"]) if obj.get("2f6dde9d-ca1f-4105-b398-05a2968dde24") is not None else None, + "17a12b0d-0ee3-4344-ae96-716aacbeb6f6": obj.get("17a12b0d-0ee3-4344-ae96-716aacbeb6f6"), + "afcfd581-bc9e-419b-8784-b7e60595ed66": BetaSessionServiceSendCode.from_dict(obj["afcfd581-bc9e-419b-8784-b7e60595ed66"]) if obj.get("afcfd581-bc9e-419b-8784-b7e60595ed66") is not None else None, + "66906b6c-a659-4f82-a989-5a500cbdc203": BetaSessionServiceUserIDQuery.from_dict(obj["66906b6c-a659-4f82-a989-5a500cbdc203"]) if obj.get("66906b6c-a659-4f82-a989-5a500cbdc203") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/no_op200_response10.py b/zitadel_client/models/no_op200_response10.py new file mode 100644 index 00000000..9c93bdfe --- /dev/null +++ b/zitadel_client/models/no_op200_response10.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_add_human_user_request import BetaOrganizationServiceAddHumanUserRequest +from zitadel_client.models.beta_organization_service_hashed_password import BetaOrganizationServiceHashedPassword +from zitadel_client.models.beta_organization_service_password import BetaOrganizationServicePassword +from zitadel_client.models.beta_organization_service_send_email_verification_code import BetaOrganizationServiceSendEmailVerificationCode +from typing import Optional, Set +from typing_extensions import Self + +class NoOp200Response10(BaseModel): + """ + NoOp200Response10 + """ # noqa: E501 + var_7761063e_fa20_469e_ad24_10f3934a11cb: Optional[BetaOrganizationServiceAddHumanUserRequest] = Field(default=None, alias="7761063e-fa20-469e-ad24-10f3934a11cb") + c6609ff7_89f6_4179_b151_722f9e4ea275: Optional[BetaOrganizationServiceHashedPassword] = Field(default=None, alias="c6609ff7-89f6-4179-b151-722f9e4ea275") + var_5a007200_44ea_4e1f_a598_456ec4ca580d: Optional[BetaOrganizationServicePassword] = Field(default=None, alias="5a007200-44ea-4e1f-a598-456ec4ca580d") + var_64e2cfb6_30a2_45f7_ab29_e435e8c1a540: Optional[Dict[str, Any]] = Field(default=None, alias="64e2cfb6-30a2-45f7-ab29-e435e8c1a540") + var_6fc729ff_3ce4_4402_9f55_1964c189c27f: Optional[Dict[str, Any]] = Field(default=None, alias="6fc729ff-3ce4-4402-9f55-1964c189c27f") + c16703c5_43ff_41b2_8117_cbdb740f4669: Optional[BetaOrganizationServiceSendEmailVerificationCode] = Field(default=None, alias="c16703c5-43ff-41b2-8117-cbdb740f4669") + var_3d08c772_dcf7_42b2_a1ed_520618ab6a2b: Optional[Dict[str, Any]] = Field(default=None, alias="3d08c772-dcf7-42b2-a1ed-520618ab6a2b") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NoOp200Response10 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_7761063e_fa20_469e_ad24_10f3934a11cb + if self.var_7761063e_fa20_469e_ad24_10f3934a11cb: + _dict['7761063e-fa20-469e-ad24-10f3934a11cb'] = self.var_7761063e_fa20_469e_ad24_10f3934a11cb.to_dict() + # override the default output from pydantic by calling `to_dict()` of c6609ff7_89f6_4179_b151_722f9e4ea275 + if self.c6609ff7_89f6_4179_b151_722f9e4ea275: + _dict['c6609ff7-89f6-4179-b151-722f9e4ea275'] = self.c6609ff7_89f6_4179_b151_722f9e4ea275.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_5a007200_44ea_4e1f_a598_456ec4ca580d + if self.var_5a007200_44ea_4e1f_a598_456ec4ca580d: + _dict['5a007200-44ea-4e1f-a598-456ec4ca580d'] = self.var_5a007200_44ea_4e1f_a598_456ec4ca580d.to_dict() + # override the default output from pydantic by calling `to_dict()` of c16703c5_43ff_41b2_8117_cbdb740f4669 + if self.c16703c5_43ff_41b2_8117_cbdb740f4669: + _dict['c16703c5-43ff-41b2-8117-cbdb740f4669'] = self.c16703c5_43ff_41b2_8117_cbdb740f4669.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NoOp200Response10 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "7761063e-fa20-469e-ad24-10f3934a11cb": BetaOrganizationServiceAddHumanUserRequest.from_dict(obj["7761063e-fa20-469e-ad24-10f3934a11cb"]) if obj.get("7761063e-fa20-469e-ad24-10f3934a11cb") is not None else None, + "c6609ff7-89f6-4179-b151-722f9e4ea275": BetaOrganizationServiceHashedPassword.from_dict(obj["c6609ff7-89f6-4179-b151-722f9e4ea275"]) if obj.get("c6609ff7-89f6-4179-b151-722f9e4ea275") is not None else None, + "5a007200-44ea-4e1f-a598-456ec4ca580d": BetaOrganizationServicePassword.from_dict(obj["5a007200-44ea-4e1f-a598-456ec4ca580d"]) if obj.get("5a007200-44ea-4e1f-a598-456ec4ca580d") is not None else None, + "64e2cfb6-30a2-45f7-ab29-e435e8c1a540": obj.get("64e2cfb6-30a2-45f7-ab29-e435e8c1a540"), + "6fc729ff-3ce4-4402-9f55-1964c189c27f": obj.get("6fc729ff-3ce4-4402-9f55-1964c189c27f"), + "c16703c5-43ff-41b2-8117-cbdb740f4669": BetaOrganizationServiceSendEmailVerificationCode.from_dict(obj["c16703c5-43ff-41b2-8117-cbdb740f4669"]) if obj.get("c16703c5-43ff-41b2-8117-cbdb740f4669") is not None else None, + "3d08c772-dcf7-42b2-a1ed-520618ab6a2b": obj.get("3d08c772-dcf7-42b2-a1ed-520618ab6a2b") + }) + return _obj + + diff --git a/zitadel_client/models/no_op200_response11.py b/zitadel_client/models/no_op200_response11.py new file mode 100644 index 00000000..4fd93761 --- /dev/null +++ b/zitadel_client/models/no_op200_response11.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_oidc_service_authorization_error import BetaOIDCServiceAuthorizationError +from zitadel_client.models.beta_oidc_service_session import BetaOIDCServiceSession +from typing import Optional, Set +from typing_extensions import Self + +class NoOp200Response11(BaseModel): + """ + NoOp200Response11 + """ # noqa: E501 + var_02a07804_c815_433b_90d3_6077e61fddfa: Optional[BetaOIDCServiceAuthorizationError] = Field(default=None, alias="02a07804-c815-433b-90d3-6077e61fddfa") + var_45a9a802_35d0_49c6_b96d_f3f140b58c4c: Optional[BetaOIDCServiceSession] = Field(default=None, alias="45a9a802-35d0-49c6-b96d-f3f140b58c4c") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NoOp200Response11 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_02a07804_c815_433b_90d3_6077e61fddfa + if self.var_02a07804_c815_433b_90d3_6077e61fddfa: + _dict['02a07804-c815-433b-90d3-6077e61fddfa'] = self.var_02a07804_c815_433b_90d3_6077e61fddfa.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_45a9a802_35d0_49c6_b96d_f3f140b58c4c + if self.var_45a9a802_35d0_49c6_b96d_f3f140b58c4c: + _dict['45a9a802-35d0-49c6-b96d-f3f140b58c4c'] = self.var_45a9a802_35d0_49c6_b96d_f3f140b58c4c.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NoOp200Response11 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "02a07804-c815-433b-90d3-6077e61fddfa": BetaOIDCServiceAuthorizationError.from_dict(obj["02a07804-c815-433b-90d3-6077e61fddfa"]) if obj.get("02a07804-c815-433b-90d3-6077e61fddfa") is not None else None, + "45a9a802-35d0-49c6-b96d-f3f140b58c4c": BetaOIDCServiceSession.from_dict(obj["45a9a802-35d0-49c6-b96d-f3f140b58c4c"]) if obj.get("45a9a802-35d0-49c6-b96d-f3f140b58c4c") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/no_op200_response2.py b/zitadel_client/models/no_op200_response2.py new file mode 100644 index 00000000..5662c033 --- /dev/null +++ b/zitadel_client/models/no_op200_response2.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.session_service_creation_date_query import SessionServiceCreationDateQuery +from zitadel_client.models.session_service_creator_query import SessionServiceCreatorQuery +from zitadel_client.models.session_service_ids_query import SessionServiceIDsQuery +from zitadel_client.models.session_service_send_code import SessionServiceSendCode +from zitadel_client.models.session_service_user_agent_query import SessionServiceUserAgentQuery +from zitadel_client.models.session_service_user_id_query import SessionServiceUserIDQuery +from typing import Optional, Set +from typing_extensions import Self + +class NoOp200Response2(BaseModel): + """ + NoOp200Response2 + """ # noqa: E501 + var_0d2cb2f3_2a8c_4d3b_98e7_c8122d047303: Optional[SessionServiceCreationDateQuery] = Field(default=None, alias="0d2cb2f3-2a8c-4d3b-98e7-c8122d047303") + var_44c57bbe_22c5_45be_9a41_40cac5f93c9a: Optional[SessionServiceCreatorQuery] = Field(default=None, alias="44c57bbe-22c5-45be-9a41-40cac5f93c9a") + ae8a3041_6a16_4743_8f70_3e9991abc263: Optional[SessionServiceIDsQuery] = Field(default=None, alias="ae8a3041-6a16-4743-8f70-3e9991abc263") + var_9921edc5_b3bd_4d6f_b078_73e4884f1189: Optional[Dict[str, Any]] = Field(default=None, alias="9921edc5-b3bd-4d6f-b078-73e4884f1189") + var_3894714d_b1ac_498e_81f0_fa28ec0b1f38: Optional[SessionServiceSendCode] = Field(default=None, alias="3894714d-b1ac-498e-81f0-fa28ec0b1f38") + a9c30361_4268_47d1_9a2e_aeb7b6d7433c: Optional[SessionServiceUserAgentQuery] = Field(default=None, alias="a9c30361-4268-47d1-9a2e-aeb7b6d7433c") + var_6e9c8f15_1036_4721_97de_a07052388a76: Optional[SessionServiceUserIDQuery] = Field(default=None, alias="6e9c8f15-1036-4721-97de-a07052388a76") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NoOp200Response2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_0d2cb2f3_2a8c_4d3b_98e7_c8122d047303 + if self.var_0d2cb2f3_2a8c_4d3b_98e7_c8122d047303: + _dict['0d2cb2f3-2a8c-4d3b-98e7-c8122d047303'] = self.var_0d2cb2f3_2a8c_4d3b_98e7_c8122d047303.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_44c57bbe_22c5_45be_9a41_40cac5f93c9a + if self.var_44c57bbe_22c5_45be_9a41_40cac5f93c9a: + _dict['44c57bbe-22c5-45be-9a41-40cac5f93c9a'] = self.var_44c57bbe_22c5_45be_9a41_40cac5f93c9a.to_dict() + # override the default output from pydantic by calling `to_dict()` of ae8a3041_6a16_4743_8f70_3e9991abc263 + if self.ae8a3041_6a16_4743_8f70_3e9991abc263: + _dict['ae8a3041-6a16-4743-8f70-3e9991abc263'] = self.ae8a3041_6a16_4743_8f70_3e9991abc263.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_3894714d_b1ac_498e_81f0_fa28ec0b1f38 + if self.var_3894714d_b1ac_498e_81f0_fa28ec0b1f38: + _dict['3894714d-b1ac-498e-81f0-fa28ec0b1f38'] = self.var_3894714d_b1ac_498e_81f0_fa28ec0b1f38.to_dict() + # override the default output from pydantic by calling `to_dict()` of a9c30361_4268_47d1_9a2e_aeb7b6d7433c + if self.a9c30361_4268_47d1_9a2e_aeb7b6d7433c: + _dict['a9c30361-4268-47d1-9a2e-aeb7b6d7433c'] = self.a9c30361_4268_47d1_9a2e_aeb7b6d7433c.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_6e9c8f15_1036_4721_97de_a07052388a76 + if self.var_6e9c8f15_1036_4721_97de_a07052388a76: + _dict['6e9c8f15-1036-4721-97de-a07052388a76'] = self.var_6e9c8f15_1036_4721_97de_a07052388a76.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NoOp200Response2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "0d2cb2f3-2a8c-4d3b-98e7-c8122d047303": SessionServiceCreationDateQuery.from_dict(obj["0d2cb2f3-2a8c-4d3b-98e7-c8122d047303"]) if obj.get("0d2cb2f3-2a8c-4d3b-98e7-c8122d047303") is not None else None, + "44c57bbe-22c5-45be-9a41-40cac5f93c9a": SessionServiceCreatorQuery.from_dict(obj["44c57bbe-22c5-45be-9a41-40cac5f93c9a"]) if obj.get("44c57bbe-22c5-45be-9a41-40cac5f93c9a") is not None else None, + "ae8a3041-6a16-4743-8f70-3e9991abc263": SessionServiceIDsQuery.from_dict(obj["ae8a3041-6a16-4743-8f70-3e9991abc263"]) if obj.get("ae8a3041-6a16-4743-8f70-3e9991abc263") is not None else None, + "9921edc5-b3bd-4d6f-b078-73e4884f1189": obj.get("9921edc5-b3bd-4d6f-b078-73e4884f1189"), + "3894714d-b1ac-498e-81f0-fa28ec0b1f38": SessionServiceSendCode.from_dict(obj["3894714d-b1ac-498e-81f0-fa28ec0b1f38"]) if obj.get("3894714d-b1ac-498e-81f0-fa28ec0b1f38") is not None else None, + "a9c30361-4268-47d1-9a2e-aeb7b6d7433c": SessionServiceUserAgentQuery.from_dict(obj["a9c30361-4268-47d1-9a2e-aeb7b6d7433c"]) if obj.get("a9c30361-4268-47d1-9a2e-aeb7b6d7433c") is not None else None, + "6e9c8f15-1036-4721-97de-a07052388a76": SessionServiceUserIDQuery.from_dict(obj["6e9c8f15-1036-4721-97de-a07052388a76"]) if obj.get("6e9c8f15-1036-4721-97de-a07052388a76") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/no_op200_response3.py b/zitadel_client/models/no_op200_response3.py new file mode 100644 index 00000000..e71bbfc6 --- /dev/null +++ b/zitadel_client/models/no_op200_response3.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_web_key_service_ecdsa import BetaWebKeyServiceECDSA +from zitadel_client.models.beta_web_key_service_rsa import BetaWebKeyServiceRSA +from typing import Optional, Set +from typing_extensions import Self + +class NoOp200Response3(BaseModel): + """ + NoOp200Response3 + """ # noqa: E501 + var_1d6c34f6_301b_4480_84f7_a47ba35fa043: Optional[BetaWebKeyServiceECDSA] = Field(default=None, alias="1d6c34f6-301b-4480-84f7-a47ba35fa043") + c784c732_a5f8_4ecd_9896_ef41f41e5ecf: Optional[Dict[str, Any]] = Field(default=None, alias="c784c732-a5f8-4ecd-9896-ef41f41e5ecf") + var_91669586_a283_405f_9a5c_4be5098d7f3a: Optional[BetaWebKeyServiceRSA] = Field(default=None, alias="91669586-a283-405f-9a5c-4be5098d7f3a") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NoOp200Response3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_1d6c34f6_301b_4480_84f7_a47ba35fa043 + if self.var_1d6c34f6_301b_4480_84f7_a47ba35fa043: + _dict['1d6c34f6-301b-4480-84f7-a47ba35fa043'] = self.var_1d6c34f6_301b_4480_84f7_a47ba35fa043.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_91669586_a283_405f_9a5c_4be5098d7f3a + if self.var_91669586_a283_405f_9a5c_4be5098d7f3a: + _dict['91669586-a283-405f-9a5c-4be5098d7f3a'] = self.var_91669586_a283_405f_9a5c_4be5098d7f3a.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NoOp200Response3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "1d6c34f6-301b-4480-84f7-a47ba35fa043": BetaWebKeyServiceECDSA.from_dict(obj["1d6c34f6-301b-4480-84f7-a47ba35fa043"]) if obj.get("1d6c34f6-301b-4480-84f7-a47ba35fa043") is not None else None, + "c784c732-a5f8-4ecd-9896-ef41f41e5ecf": obj.get("c784c732-a5f8-4ecd-9896-ef41f41e5ecf"), + "91669586-a283-405f-9a5c-4be5098d7f3a": BetaWebKeyServiceRSA.from_dict(obj["91669586-a283-405f-9a5c-4be5098d7f3a"]) if obj.get("91669586-a283-405f-9a5c-4be5098d7f3a") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/no_op200_response4.py b/zitadel_client/models/no_op200_response4.py new file mode 100644 index 00000000..603e8e67 --- /dev/null +++ b/zitadel_client/models/no_op200_response4.py @@ -0,0 +1,288 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_and_query import UserServiceAndQuery +from zitadel_client.models.user_service_auth_factor_u2_f import UserServiceAuthFactorU2F +from zitadel_client.models.user_service_display_name_query import UserServiceDisplayNameQuery +from zitadel_client.models.user_service_email_query import UserServiceEmailQuery +from zitadel_client.models.user_service_first_name_query import UserServiceFirstNameQuery +from zitadel_client.models.user_service_hashed_password import UserServiceHashedPassword +from zitadel_client.models.user_service_human_user import UserServiceHumanUser +from zitadel_client.models.user_service_idp_intent import UserServiceIDPIntent +from zitadel_client.models.user_service_idpldap_access_information import UserServiceIDPLDAPAccessInformation +from zitadel_client.models.user_service_idpo_auth_access_information import UserServiceIDPOAuthAccessInformation +from zitadel_client.models.user_service_idpsaml_access_information import UserServiceIDPSAMLAccessInformation +from zitadel_client.models.user_service_in_user_emails_query import UserServiceInUserEmailsQuery +from zitadel_client.models.user_service_in_user_id_query import UserServiceInUserIDQuery +from zitadel_client.models.user_service_last_name_query import UserServiceLastNameQuery +from zitadel_client.models.user_service_ldap_credentials import UserServiceLDAPCredentials +from zitadel_client.models.user_service_login_name_query import UserServiceLoginNameQuery +from zitadel_client.models.user_service_machine_user import UserServiceMachineUser +from zitadel_client.models.user_service_nick_name_query import UserServiceNickNameQuery +from zitadel_client.models.user_service_not_query import UserServiceNotQuery +from zitadel_client.models.user_service_or_query import UserServiceOrQuery +from zitadel_client.models.user_service_organization_id_query import UserServiceOrganizationIdQuery +from zitadel_client.models.user_service_password import UserServicePassword +from zitadel_client.models.user_service_phone_query import UserServicePhoneQuery +from zitadel_client.models.user_service_redirect_urls import UserServiceRedirectURLs +from zitadel_client.models.user_service_send_email_verification_code import UserServiceSendEmailVerificationCode +from zitadel_client.models.user_service_send_invite_code import UserServiceSendInviteCode +from zitadel_client.models.user_service_send_passkey_registration_link import UserServiceSendPasskeyRegistrationLink +from zitadel_client.models.user_service_send_password_reset_link import UserServiceSendPasswordResetLink +from zitadel_client.models.user_service_state_query import UserServiceStateQuery +from zitadel_client.models.user_service_type_query import UserServiceTypeQuery +from zitadel_client.models.user_service_user_name_query import UserServiceUserNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class NoOp200Response4(BaseModel): + """ + NoOp200Response4 + """ # noqa: E501 + f83cbcd6_5036_4bf9_81df_5e981a715601: Optional[UserServiceAndQuery] = Field(default=None, alias="f83cbcd6-5036-4bf9-81df-5e981a715601") + var_2c71a3b1_ca6e_4083_b890_ce7e1417208c: Optional[Dict[str, Any]] = Field(default=None, alias="2c71a3b1-ca6e-4083-b890-ce7e1417208c") + d5c89d63_8d40_4cc1_bf55_d80555c47869: Optional[Dict[str, Any]] = Field(default=None, alias="d5c89d63-8d40-4cc1-bf55-d80555c47869") + c6f1c3a5_af2b_42db_890c_3710b529d4c5: Optional[Dict[str, Any]] = Field(default=None, alias="c6f1c3a5-af2b-42db-890c-3710b529d4c5") + dfdd898b_6379_4e2f_8c22_5cafcd3d5ef6: Optional[UserServiceAuthFactorU2F] = Field(default=None, alias="dfdd898b-6379-4e2f-8c22-5cafcd3d5ef6") + var_4bbfd13b_c962_483f_b46f_2ee3fffec835: Optional[UserServiceDisplayNameQuery] = Field(default=None, alias="4bbfd13b-c962-483f-b46f-2ee3fffec835") + b0c12bff_7b73_4063_9e3a_247d21b6573c: Optional[UserServiceEmailQuery] = Field(default=None, alias="b0c12bff-7b73-4063-9e3a-247d21b6573c") + var_88ca59f6_a6a7_4734_8fe7_76e79f648e60: Optional[UserServiceFirstNameQuery] = Field(default=None, alias="88ca59f6-a6a7-4734-8fe7-76e79f648e60") + f110e839_fa11_4c73_aeea_d6660a4723a9: Optional[UserServiceHashedPassword] = Field(default=None, alias="f110e839-fa11-4c73-aeea-d6660a4723a9") + ac724ea0_f3ed_4fcb_999b_ee9af910fbe6: Optional[UserServiceHumanUser] = Field(default=None, alias="ac724ea0-f3ed-4fcb-999b-ee9af910fbe6") + a3e3b385_88a5_4472_b687_879df649ca3e: Optional[UserServiceIDPIntent] = Field(default=None, alias="a3e3b385-88a5-4472-b687-879df649ca3e") + var_39c2a131_53aa_4334_92a0_ac7338b2ce67: Optional[UserServiceIDPLDAPAccessInformation] = Field(default=None, alias="39c2a131-53aa-4334-92a0-ac7338b2ce67") + b742b05f_e9ca_4dab_a966_28ac2d0da16c: Optional[UserServiceIDPOAuthAccessInformation] = Field(default=None, alias="b742b05f-e9ca-4dab-a966-28ac2d0da16c") + var_5098155e_573f_4c48_85fe_4f3c9c588931: Optional[UserServiceIDPSAMLAccessInformation] = Field(default=None, alias="5098155e-573f-4c48-85fe-4f3c9c588931") + var_0e608113_4718_441e_9482_b82d45d55586: Optional[UserServiceInUserEmailsQuery] = Field(default=None, alias="0e608113-4718-441e-9482-b82d45d55586") + b06ee9a4_21ac_446e_b16f_9ee6703c52f2: Optional[UserServiceInUserIDQuery] = Field(default=None, alias="b06ee9a4-21ac-446e-b16f-9ee6703c52f2") + c52030ba_0a5d_48bf_8956_396a28e6203b: Optional[UserServiceLDAPCredentials] = Field(default=None, alias="c52030ba-0a5d-48bf-8956-396a28e6203b") + var_93616c1c_6556_4f8d_9446_aa25ddb024fd: Optional[UserServiceLastNameQuery] = Field(default=None, alias="93616c1c-6556-4f8d-9446-aa25ddb024fd") + var_73c97b6f_ecbc_46d9_b33a_c76b0193fa24: Optional[UserServiceLoginNameQuery] = Field(default=None, alias="73c97b6f-ecbc-46d9-b33a-c76b0193fa24") + var_9237e11b_e859_48c7_99d8_37be608b578f: Optional[UserServiceMachineUser] = Field(default=None, alias="9237e11b-e859-48c7-99d8-37be608b578f") + var_41ea4efa_714b_49a0_b7a4_5ea0accb986d: Optional[UserServiceNickNameQuery] = Field(default=None, alias="41ea4efa-714b-49a0-b7a4-5ea0accb986d") + a614946e_6bd0_4b26_b947_4d18205eda35: Optional[UserServiceNotQuery] = Field(default=None, alias="a614946e-6bd0-4b26-b947-4d18205eda35") + var_652fb458_3243_44c1_b75a_9dcf0b130c7b: Optional[UserServiceOrQuery] = Field(default=None, alias="652fb458-3243-44c1-b75a-9dcf0b130c7b") + var_0063cccd_e3f7_4f83_8a9f_f9f2f2001fa9: Optional[UserServiceOrganizationIdQuery] = Field(default=None, alias="0063cccd-e3f7-4f83-8a9f-f9f2f2001fa9") + var_5340fb08_d545_4c8c_b47a_ecb6bfaa621a: Optional[UserServicePassword] = Field(default=None, alias="5340fb08-d545-4c8c-b47a-ecb6bfaa621a") + ed2e8b69_6e67_4202_a1b0_ecfd937d2ddf: Optional[UserServicePhoneQuery] = Field(default=None, alias="ed2e8b69-6e67-4202-a1b0-ecfd937d2ddf") + var_9e93d182_2acf_4856_a916_6e0d81d39cea: Optional[UserServiceRedirectURLs] = Field(default=None, alias="9e93d182-2acf-4856-a916-6e0d81d39cea") + var_1fc91c19_eef2_45c8_8514_6c624f785660: Optional[Dict[str, Any]] = Field(default=None, alias="1fc91c19-eef2-45c8-8514-6c624f785660") + c13ba8a1_4283_4a8c_9291_126631d1ad41: Optional[Dict[str, Any]] = Field(default=None, alias="c13ba8a1-4283-4a8c-9291-126631d1ad41") + var_3e19c972_6f3f_4eb6_8ca2_96cd9f2087ea: Optional[Dict[str, Any]] = Field(default=None, alias="3e19c972-6f3f-4eb6-8ca2-96cd9f2087ea") + var_74045de4_94c8_4118_b0a2_e40a23bf4399: Optional[Dict[str, Any]] = Field(default=None, alias="74045de4-94c8-4118-b0a2-e40a23bf4399") + f2f1dabe_90ec_4e66_bb06_308dda585c74: Optional[Dict[str, Any]] = Field(default=None, alias="f2f1dabe-90ec-4e66-bb06-308dda585c74") + var_98d4b310_bd3a_4be3_954e_393580550f8e: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="98d4b310-bd3a-4be3-954e-393580550f8e") + var_9dd39bba_3a07_4732_9fba_b304fd0e5a88: Optional[UserServiceSendInviteCode] = Field(default=None, alias="9dd39bba-3a07-4732-9fba-b304fd0e5a88") + var_236b67a6_26aa_4cf7_9c3d_f15e31eef06b: Optional[UserServiceSendPasskeyRegistrationLink] = Field(default=None, alias="236b67a6-26aa-4cf7-9c3d-f15e31eef06b") + var_8a890a58_c2fc_4784_86de_6d34c866bc6d: Optional[UserServiceSendPasswordResetLink] = Field(default=None, alias="8a890a58-c2fc-4784-86de-6d34c866bc6d") + var_80a2ea01_67c9_4c08_a15d_8aa8c5f65814: Optional[Dict[str, Any]] = Field(default=None, alias="80a2ea01-67c9-4c08-a15d-8aa8c5f65814") + fb1210fc_3097_44c9_adfe_b5f65ae80aad: Optional[UserServiceStateQuery] = Field(default=None, alias="fb1210fc-3097-44c9-adfe-b5f65ae80aad") + var_5453af57_5195_41e1_a89a_815aefafd209: Optional[UserServiceTypeQuery] = Field(default=None, alias="5453af57-5195-41e1-a89a-815aefafd209") + ffb17b46_e3dc_4eaa_b8fe_611e1ace506d: Optional[UserServiceUserNameQuery] = Field(default=None, alias="ffb17b46-e3dc-4eaa-b8fe-611e1ace506d") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NoOp200Response4 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of f83cbcd6_5036_4bf9_81df_5e981a715601 + if self.f83cbcd6_5036_4bf9_81df_5e981a715601: + _dict['f83cbcd6-5036-4bf9-81df-5e981a715601'] = self.f83cbcd6_5036_4bf9_81df_5e981a715601.to_dict() + # override the default output from pydantic by calling `to_dict()` of dfdd898b_6379_4e2f_8c22_5cafcd3d5ef6 + if self.dfdd898b_6379_4e2f_8c22_5cafcd3d5ef6: + _dict['dfdd898b-6379-4e2f-8c22-5cafcd3d5ef6'] = self.dfdd898b_6379_4e2f_8c22_5cafcd3d5ef6.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_4bbfd13b_c962_483f_b46f_2ee3fffec835 + if self.var_4bbfd13b_c962_483f_b46f_2ee3fffec835: + _dict['4bbfd13b-c962-483f-b46f-2ee3fffec835'] = self.var_4bbfd13b_c962_483f_b46f_2ee3fffec835.to_dict() + # override the default output from pydantic by calling `to_dict()` of b0c12bff_7b73_4063_9e3a_247d21b6573c + if self.b0c12bff_7b73_4063_9e3a_247d21b6573c: + _dict['b0c12bff-7b73-4063-9e3a-247d21b6573c'] = self.b0c12bff_7b73_4063_9e3a_247d21b6573c.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_88ca59f6_a6a7_4734_8fe7_76e79f648e60 + if self.var_88ca59f6_a6a7_4734_8fe7_76e79f648e60: + _dict['88ca59f6-a6a7-4734-8fe7-76e79f648e60'] = self.var_88ca59f6_a6a7_4734_8fe7_76e79f648e60.to_dict() + # override the default output from pydantic by calling `to_dict()` of f110e839_fa11_4c73_aeea_d6660a4723a9 + if self.f110e839_fa11_4c73_aeea_d6660a4723a9: + _dict['f110e839-fa11-4c73-aeea-d6660a4723a9'] = self.f110e839_fa11_4c73_aeea_d6660a4723a9.to_dict() + # override the default output from pydantic by calling `to_dict()` of ac724ea0_f3ed_4fcb_999b_ee9af910fbe6 + if self.ac724ea0_f3ed_4fcb_999b_ee9af910fbe6: + _dict['ac724ea0-f3ed-4fcb-999b-ee9af910fbe6'] = self.ac724ea0_f3ed_4fcb_999b_ee9af910fbe6.to_dict() + # override the default output from pydantic by calling `to_dict()` of a3e3b385_88a5_4472_b687_879df649ca3e + if self.a3e3b385_88a5_4472_b687_879df649ca3e: + _dict['a3e3b385-88a5-4472-b687-879df649ca3e'] = self.a3e3b385_88a5_4472_b687_879df649ca3e.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_39c2a131_53aa_4334_92a0_ac7338b2ce67 + if self.var_39c2a131_53aa_4334_92a0_ac7338b2ce67: + _dict['39c2a131-53aa-4334-92a0-ac7338b2ce67'] = self.var_39c2a131_53aa_4334_92a0_ac7338b2ce67.to_dict() + # override the default output from pydantic by calling `to_dict()` of b742b05f_e9ca_4dab_a966_28ac2d0da16c + if self.b742b05f_e9ca_4dab_a966_28ac2d0da16c: + _dict['b742b05f-e9ca-4dab-a966-28ac2d0da16c'] = self.b742b05f_e9ca_4dab_a966_28ac2d0da16c.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_5098155e_573f_4c48_85fe_4f3c9c588931 + if self.var_5098155e_573f_4c48_85fe_4f3c9c588931: + _dict['5098155e-573f-4c48-85fe-4f3c9c588931'] = self.var_5098155e_573f_4c48_85fe_4f3c9c588931.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_0e608113_4718_441e_9482_b82d45d55586 + if self.var_0e608113_4718_441e_9482_b82d45d55586: + _dict['0e608113-4718-441e-9482-b82d45d55586'] = self.var_0e608113_4718_441e_9482_b82d45d55586.to_dict() + # override the default output from pydantic by calling `to_dict()` of b06ee9a4_21ac_446e_b16f_9ee6703c52f2 + if self.b06ee9a4_21ac_446e_b16f_9ee6703c52f2: + _dict['b06ee9a4-21ac-446e-b16f-9ee6703c52f2'] = self.b06ee9a4_21ac_446e_b16f_9ee6703c52f2.to_dict() + # override the default output from pydantic by calling `to_dict()` of c52030ba_0a5d_48bf_8956_396a28e6203b + if self.c52030ba_0a5d_48bf_8956_396a28e6203b: + _dict['c52030ba-0a5d-48bf-8956-396a28e6203b'] = self.c52030ba_0a5d_48bf_8956_396a28e6203b.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_93616c1c_6556_4f8d_9446_aa25ddb024fd + if self.var_93616c1c_6556_4f8d_9446_aa25ddb024fd: + _dict['93616c1c-6556-4f8d-9446-aa25ddb024fd'] = self.var_93616c1c_6556_4f8d_9446_aa25ddb024fd.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_73c97b6f_ecbc_46d9_b33a_c76b0193fa24 + if self.var_73c97b6f_ecbc_46d9_b33a_c76b0193fa24: + _dict['73c97b6f-ecbc-46d9-b33a-c76b0193fa24'] = self.var_73c97b6f_ecbc_46d9_b33a_c76b0193fa24.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_9237e11b_e859_48c7_99d8_37be608b578f + if self.var_9237e11b_e859_48c7_99d8_37be608b578f: + _dict['9237e11b-e859-48c7-99d8-37be608b578f'] = self.var_9237e11b_e859_48c7_99d8_37be608b578f.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_41ea4efa_714b_49a0_b7a4_5ea0accb986d + if self.var_41ea4efa_714b_49a0_b7a4_5ea0accb986d: + _dict['41ea4efa-714b-49a0-b7a4-5ea0accb986d'] = self.var_41ea4efa_714b_49a0_b7a4_5ea0accb986d.to_dict() + # override the default output from pydantic by calling `to_dict()` of a614946e_6bd0_4b26_b947_4d18205eda35 + if self.a614946e_6bd0_4b26_b947_4d18205eda35: + _dict['a614946e-6bd0-4b26-b947-4d18205eda35'] = self.a614946e_6bd0_4b26_b947_4d18205eda35.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_652fb458_3243_44c1_b75a_9dcf0b130c7b + if self.var_652fb458_3243_44c1_b75a_9dcf0b130c7b: + _dict['652fb458-3243-44c1-b75a-9dcf0b130c7b'] = self.var_652fb458_3243_44c1_b75a_9dcf0b130c7b.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_0063cccd_e3f7_4f83_8a9f_f9f2f2001fa9 + if self.var_0063cccd_e3f7_4f83_8a9f_f9f2f2001fa9: + _dict['0063cccd-e3f7-4f83-8a9f-f9f2f2001fa9'] = self.var_0063cccd_e3f7_4f83_8a9f_f9f2f2001fa9.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_5340fb08_d545_4c8c_b47a_ecb6bfaa621a + if self.var_5340fb08_d545_4c8c_b47a_ecb6bfaa621a: + _dict['5340fb08-d545-4c8c-b47a-ecb6bfaa621a'] = self.var_5340fb08_d545_4c8c_b47a_ecb6bfaa621a.to_dict() + # override the default output from pydantic by calling `to_dict()` of ed2e8b69_6e67_4202_a1b0_ecfd937d2ddf + if self.ed2e8b69_6e67_4202_a1b0_ecfd937d2ddf: + _dict['ed2e8b69-6e67-4202-a1b0-ecfd937d2ddf'] = self.ed2e8b69_6e67_4202_a1b0_ecfd937d2ddf.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_9e93d182_2acf_4856_a916_6e0d81d39cea + if self.var_9e93d182_2acf_4856_a916_6e0d81d39cea: + _dict['9e93d182-2acf-4856-a916-6e0d81d39cea'] = self.var_9e93d182_2acf_4856_a916_6e0d81d39cea.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_98d4b310_bd3a_4be3_954e_393580550f8e + if self.var_98d4b310_bd3a_4be3_954e_393580550f8e: + _dict['98d4b310-bd3a-4be3-954e-393580550f8e'] = self.var_98d4b310_bd3a_4be3_954e_393580550f8e.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_9dd39bba_3a07_4732_9fba_b304fd0e5a88 + if self.var_9dd39bba_3a07_4732_9fba_b304fd0e5a88: + _dict['9dd39bba-3a07-4732-9fba-b304fd0e5a88'] = self.var_9dd39bba_3a07_4732_9fba_b304fd0e5a88.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_236b67a6_26aa_4cf7_9c3d_f15e31eef06b + if self.var_236b67a6_26aa_4cf7_9c3d_f15e31eef06b: + _dict['236b67a6-26aa-4cf7-9c3d-f15e31eef06b'] = self.var_236b67a6_26aa_4cf7_9c3d_f15e31eef06b.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_8a890a58_c2fc_4784_86de_6d34c866bc6d + if self.var_8a890a58_c2fc_4784_86de_6d34c866bc6d: + _dict['8a890a58-c2fc-4784-86de-6d34c866bc6d'] = self.var_8a890a58_c2fc_4784_86de_6d34c866bc6d.to_dict() + # override the default output from pydantic by calling `to_dict()` of fb1210fc_3097_44c9_adfe_b5f65ae80aad + if self.fb1210fc_3097_44c9_adfe_b5f65ae80aad: + _dict['fb1210fc-3097-44c9-adfe-b5f65ae80aad'] = self.fb1210fc_3097_44c9_adfe_b5f65ae80aad.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_5453af57_5195_41e1_a89a_815aefafd209 + if self.var_5453af57_5195_41e1_a89a_815aefafd209: + _dict['5453af57-5195-41e1-a89a-815aefafd209'] = self.var_5453af57_5195_41e1_a89a_815aefafd209.to_dict() + # override the default output from pydantic by calling `to_dict()` of ffb17b46_e3dc_4eaa_b8fe_611e1ace506d + if self.ffb17b46_e3dc_4eaa_b8fe_611e1ace506d: + _dict['ffb17b46-e3dc-4eaa-b8fe-611e1ace506d'] = self.ffb17b46_e3dc_4eaa_b8fe_611e1ace506d.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NoOp200Response4 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "f83cbcd6-5036-4bf9-81df-5e981a715601": UserServiceAndQuery.from_dict(obj["f83cbcd6-5036-4bf9-81df-5e981a715601"]) if obj.get("f83cbcd6-5036-4bf9-81df-5e981a715601") is not None else None, + "2c71a3b1-ca6e-4083-b890-ce7e1417208c": obj.get("2c71a3b1-ca6e-4083-b890-ce7e1417208c"), + "d5c89d63-8d40-4cc1-bf55-d80555c47869": obj.get("d5c89d63-8d40-4cc1-bf55-d80555c47869"), + "c6f1c3a5-af2b-42db-890c-3710b529d4c5": obj.get("c6f1c3a5-af2b-42db-890c-3710b529d4c5"), + "dfdd898b-6379-4e2f-8c22-5cafcd3d5ef6": UserServiceAuthFactorU2F.from_dict(obj["dfdd898b-6379-4e2f-8c22-5cafcd3d5ef6"]) if obj.get("dfdd898b-6379-4e2f-8c22-5cafcd3d5ef6") is not None else None, + "4bbfd13b-c962-483f-b46f-2ee3fffec835": UserServiceDisplayNameQuery.from_dict(obj["4bbfd13b-c962-483f-b46f-2ee3fffec835"]) if obj.get("4bbfd13b-c962-483f-b46f-2ee3fffec835") is not None else None, + "b0c12bff-7b73-4063-9e3a-247d21b6573c": UserServiceEmailQuery.from_dict(obj["b0c12bff-7b73-4063-9e3a-247d21b6573c"]) if obj.get("b0c12bff-7b73-4063-9e3a-247d21b6573c") is not None else None, + "88ca59f6-a6a7-4734-8fe7-76e79f648e60": UserServiceFirstNameQuery.from_dict(obj["88ca59f6-a6a7-4734-8fe7-76e79f648e60"]) if obj.get("88ca59f6-a6a7-4734-8fe7-76e79f648e60") is not None else None, + "f110e839-fa11-4c73-aeea-d6660a4723a9": UserServiceHashedPassword.from_dict(obj["f110e839-fa11-4c73-aeea-d6660a4723a9"]) if obj.get("f110e839-fa11-4c73-aeea-d6660a4723a9") is not None else None, + "ac724ea0-f3ed-4fcb-999b-ee9af910fbe6": UserServiceHumanUser.from_dict(obj["ac724ea0-f3ed-4fcb-999b-ee9af910fbe6"]) if obj.get("ac724ea0-f3ed-4fcb-999b-ee9af910fbe6") is not None else None, + "a3e3b385-88a5-4472-b687-879df649ca3e": UserServiceIDPIntent.from_dict(obj["a3e3b385-88a5-4472-b687-879df649ca3e"]) if obj.get("a3e3b385-88a5-4472-b687-879df649ca3e") is not None else None, + "39c2a131-53aa-4334-92a0-ac7338b2ce67": UserServiceIDPLDAPAccessInformation.from_dict(obj["39c2a131-53aa-4334-92a0-ac7338b2ce67"]) if obj.get("39c2a131-53aa-4334-92a0-ac7338b2ce67") is not None else None, + "b742b05f-e9ca-4dab-a966-28ac2d0da16c": UserServiceIDPOAuthAccessInformation.from_dict(obj["b742b05f-e9ca-4dab-a966-28ac2d0da16c"]) if obj.get("b742b05f-e9ca-4dab-a966-28ac2d0da16c") is not None else None, + "5098155e-573f-4c48-85fe-4f3c9c588931": UserServiceIDPSAMLAccessInformation.from_dict(obj["5098155e-573f-4c48-85fe-4f3c9c588931"]) if obj.get("5098155e-573f-4c48-85fe-4f3c9c588931") is not None else None, + "0e608113-4718-441e-9482-b82d45d55586": UserServiceInUserEmailsQuery.from_dict(obj["0e608113-4718-441e-9482-b82d45d55586"]) if obj.get("0e608113-4718-441e-9482-b82d45d55586") is not None else None, + "b06ee9a4-21ac-446e-b16f-9ee6703c52f2": UserServiceInUserIDQuery.from_dict(obj["b06ee9a4-21ac-446e-b16f-9ee6703c52f2"]) if obj.get("b06ee9a4-21ac-446e-b16f-9ee6703c52f2") is not None else None, + "c52030ba-0a5d-48bf-8956-396a28e6203b": UserServiceLDAPCredentials.from_dict(obj["c52030ba-0a5d-48bf-8956-396a28e6203b"]) if obj.get("c52030ba-0a5d-48bf-8956-396a28e6203b") is not None else None, + "93616c1c-6556-4f8d-9446-aa25ddb024fd": UserServiceLastNameQuery.from_dict(obj["93616c1c-6556-4f8d-9446-aa25ddb024fd"]) if obj.get("93616c1c-6556-4f8d-9446-aa25ddb024fd") is not None else None, + "73c97b6f-ecbc-46d9-b33a-c76b0193fa24": UserServiceLoginNameQuery.from_dict(obj["73c97b6f-ecbc-46d9-b33a-c76b0193fa24"]) if obj.get("73c97b6f-ecbc-46d9-b33a-c76b0193fa24") is not None else None, + "9237e11b-e859-48c7-99d8-37be608b578f": UserServiceMachineUser.from_dict(obj["9237e11b-e859-48c7-99d8-37be608b578f"]) if obj.get("9237e11b-e859-48c7-99d8-37be608b578f") is not None else None, + "41ea4efa-714b-49a0-b7a4-5ea0accb986d": UserServiceNickNameQuery.from_dict(obj["41ea4efa-714b-49a0-b7a4-5ea0accb986d"]) if obj.get("41ea4efa-714b-49a0-b7a4-5ea0accb986d") is not None else None, + "a614946e-6bd0-4b26-b947-4d18205eda35": UserServiceNotQuery.from_dict(obj["a614946e-6bd0-4b26-b947-4d18205eda35"]) if obj.get("a614946e-6bd0-4b26-b947-4d18205eda35") is not None else None, + "652fb458-3243-44c1-b75a-9dcf0b130c7b": UserServiceOrQuery.from_dict(obj["652fb458-3243-44c1-b75a-9dcf0b130c7b"]) if obj.get("652fb458-3243-44c1-b75a-9dcf0b130c7b") is not None else None, + "0063cccd-e3f7-4f83-8a9f-f9f2f2001fa9": UserServiceOrganizationIdQuery.from_dict(obj["0063cccd-e3f7-4f83-8a9f-f9f2f2001fa9"]) if obj.get("0063cccd-e3f7-4f83-8a9f-f9f2f2001fa9") is not None else None, + "5340fb08-d545-4c8c-b47a-ecb6bfaa621a": UserServicePassword.from_dict(obj["5340fb08-d545-4c8c-b47a-ecb6bfaa621a"]) if obj.get("5340fb08-d545-4c8c-b47a-ecb6bfaa621a") is not None else None, + "ed2e8b69-6e67-4202-a1b0-ecfd937d2ddf": UserServicePhoneQuery.from_dict(obj["ed2e8b69-6e67-4202-a1b0-ecfd937d2ddf"]) if obj.get("ed2e8b69-6e67-4202-a1b0-ecfd937d2ddf") is not None else None, + "9e93d182-2acf-4856-a916-6e0d81d39cea": UserServiceRedirectURLs.from_dict(obj["9e93d182-2acf-4856-a916-6e0d81d39cea"]) if obj.get("9e93d182-2acf-4856-a916-6e0d81d39cea") is not None else None, + "1fc91c19-eef2-45c8-8514-6c624f785660": obj.get("1fc91c19-eef2-45c8-8514-6c624f785660"), + "c13ba8a1-4283-4a8c-9291-126631d1ad41": obj.get("c13ba8a1-4283-4a8c-9291-126631d1ad41"), + "3e19c972-6f3f-4eb6-8ca2-96cd9f2087ea": obj.get("3e19c972-6f3f-4eb6-8ca2-96cd9f2087ea"), + "74045de4-94c8-4118-b0a2-e40a23bf4399": obj.get("74045de4-94c8-4118-b0a2-e40a23bf4399"), + "f2f1dabe-90ec-4e66-bb06-308dda585c74": obj.get("f2f1dabe-90ec-4e66-bb06-308dda585c74"), + "98d4b310-bd3a-4be3-954e-393580550f8e": UserServiceSendEmailVerificationCode.from_dict(obj["98d4b310-bd3a-4be3-954e-393580550f8e"]) if obj.get("98d4b310-bd3a-4be3-954e-393580550f8e") is not None else None, + "9dd39bba-3a07-4732-9fba-b304fd0e5a88": UserServiceSendInviteCode.from_dict(obj["9dd39bba-3a07-4732-9fba-b304fd0e5a88"]) if obj.get("9dd39bba-3a07-4732-9fba-b304fd0e5a88") is not None else None, + "236b67a6-26aa-4cf7-9c3d-f15e31eef06b": UserServiceSendPasskeyRegistrationLink.from_dict(obj["236b67a6-26aa-4cf7-9c3d-f15e31eef06b"]) if obj.get("236b67a6-26aa-4cf7-9c3d-f15e31eef06b") is not None else None, + "8a890a58-c2fc-4784-86de-6d34c866bc6d": UserServiceSendPasswordResetLink.from_dict(obj["8a890a58-c2fc-4784-86de-6d34c866bc6d"]) if obj.get("8a890a58-c2fc-4784-86de-6d34c866bc6d") is not None else None, + "80a2ea01-67c9-4c08-a15d-8aa8c5f65814": obj.get("80a2ea01-67c9-4c08-a15d-8aa8c5f65814"), + "fb1210fc-3097-44c9-adfe-b5f65ae80aad": UserServiceStateQuery.from_dict(obj["fb1210fc-3097-44c9-adfe-b5f65ae80aad"]) if obj.get("fb1210fc-3097-44c9-adfe-b5f65ae80aad") is not None else None, + "5453af57-5195-41e1-a89a-815aefafd209": UserServiceTypeQuery.from_dict(obj["5453af57-5195-41e1-a89a-815aefafd209"]) if obj.get("5453af57-5195-41e1-a89a-815aefafd209") is not None else None, + "ffb17b46-e3dc-4eaa-b8fe-611e1ace506d": UserServiceUserNameQuery.from_dict(obj["ffb17b46-e3dc-4eaa-b8fe-611e1ace506d"]) if obj.get("ffb17b46-e3dc-4eaa-b8fe-611e1ace506d") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/no_op200_response5.py b/zitadel_client/models/no_op200_response5.py new file mode 100644 index 00000000..4d965743 --- /dev/null +++ b/zitadel_client/models/no_op200_response5.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.organization_service_add_human_user_request import OrganizationServiceAddHumanUserRequest +from zitadel_client.models.organization_service_hashed_password import OrganizationServiceHashedPassword +from zitadel_client.models.organization_service_organization_domain_query import OrganizationServiceOrganizationDomainQuery +from zitadel_client.models.organization_service_organization_id_query import OrganizationServiceOrganizationIDQuery +from zitadel_client.models.organization_service_organization_name_query import OrganizationServiceOrganizationNameQuery +from zitadel_client.models.organization_service_organization_state_query import OrganizationServiceOrganizationStateQuery +from zitadel_client.models.organization_service_password import OrganizationServicePassword +from zitadel_client.models.organization_service_send_email_verification_code import OrganizationServiceSendEmailVerificationCode +from typing import Optional, Set +from typing_extensions import Self + +class NoOp200Response5(BaseModel): + """ + NoOp200Response5 + """ # noqa: E501 + var_3de80657_3122_467c_b3fe_9bb7c8c8f688: Optional[OrganizationServiceAddHumanUserRequest] = Field(default=None, alias="3de80657-3122-467c-b3fe-9bb7c8c8f688") + var_041c9d52_fb9b_4965_b5e3_e73b4dfe6b8d: Optional[Dict[str, Any]] = Field(default=None, alias="041c9d52-fb9b-4965-b5e3-e73b4dfe6b8d") + var_43448de5_7b8c_4175_8128_539e3bd683b8: Optional[OrganizationServiceHashedPassword] = Field(default=None, alias="43448de5-7b8c-4175-8128-539e3bd683b8") + da03a614_06de_495f_afbe_50bfc4cbea82: Optional[OrganizationServiceOrganizationDomainQuery] = Field(default=None, alias="da03a614-06de-495f-afbe-50bfc4cbea82") + var_6e5d43ff_2490_4085_beda_32e8ba0001b7: Optional[OrganizationServiceOrganizationIDQuery] = Field(default=None, alias="6e5d43ff-2490-4085-beda-32e8ba0001b7") + cac83893_051f_44b1_94b6_79fceb34af1e: Optional[OrganizationServiceOrganizationNameQuery] = Field(default=None, alias="cac83893-051f-44b1-94b6-79fceb34af1e") + ce42e35c_218e_4ad8_9dd8_683e1c958d38: Optional[OrganizationServiceOrganizationStateQuery] = Field(default=None, alias="ce42e35c-218e-4ad8-9dd8-683e1c958d38") + var_7c9811e7_d0a0_479d_b602_0d1d15949656: Optional[OrganizationServicePassword] = Field(default=None, alias="7c9811e7-d0a0-479d-b602-0d1d15949656") + e893119e_bea6_4baf_9fec_4f7db0b74899: Optional[Dict[str, Any]] = Field(default=None, alias="e893119e-bea6-4baf-9fec-4f7db0b74899") + a30c914a_2359_4acb_8b3d_63e3c075bc2e: Optional[Dict[str, Any]] = Field(default=None, alias="a30c914a-2359-4acb-8b3d-63e3c075bc2e") + var_936537c7_3759_45ce_a8a8_b838693718a7: Optional[OrganizationServiceSendEmailVerificationCode] = Field(default=None, alias="936537c7-3759-45ce-a8a8-b838693718a7") + a113f4e2_cc60_4075_aade_a8023c402717: Optional[Dict[str, Any]] = Field(default=None, alias="a113f4e2-cc60-4075-aade-a8023c402717") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NoOp200Response5 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_3de80657_3122_467c_b3fe_9bb7c8c8f688 + if self.var_3de80657_3122_467c_b3fe_9bb7c8c8f688: + _dict['3de80657-3122-467c-b3fe-9bb7c8c8f688'] = self.var_3de80657_3122_467c_b3fe_9bb7c8c8f688.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_43448de5_7b8c_4175_8128_539e3bd683b8 + if self.var_43448de5_7b8c_4175_8128_539e3bd683b8: + _dict['43448de5-7b8c-4175-8128-539e3bd683b8'] = self.var_43448de5_7b8c_4175_8128_539e3bd683b8.to_dict() + # override the default output from pydantic by calling `to_dict()` of da03a614_06de_495f_afbe_50bfc4cbea82 + if self.da03a614_06de_495f_afbe_50bfc4cbea82: + _dict['da03a614-06de-495f-afbe-50bfc4cbea82'] = self.da03a614_06de_495f_afbe_50bfc4cbea82.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_6e5d43ff_2490_4085_beda_32e8ba0001b7 + if self.var_6e5d43ff_2490_4085_beda_32e8ba0001b7: + _dict['6e5d43ff-2490-4085-beda-32e8ba0001b7'] = self.var_6e5d43ff_2490_4085_beda_32e8ba0001b7.to_dict() + # override the default output from pydantic by calling `to_dict()` of cac83893_051f_44b1_94b6_79fceb34af1e + if self.cac83893_051f_44b1_94b6_79fceb34af1e: + _dict['cac83893-051f-44b1-94b6-79fceb34af1e'] = self.cac83893_051f_44b1_94b6_79fceb34af1e.to_dict() + # override the default output from pydantic by calling `to_dict()` of ce42e35c_218e_4ad8_9dd8_683e1c958d38 + if self.ce42e35c_218e_4ad8_9dd8_683e1c958d38: + _dict['ce42e35c-218e-4ad8-9dd8-683e1c958d38'] = self.ce42e35c_218e_4ad8_9dd8_683e1c958d38.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_7c9811e7_d0a0_479d_b602_0d1d15949656 + if self.var_7c9811e7_d0a0_479d_b602_0d1d15949656: + _dict['7c9811e7-d0a0-479d-b602-0d1d15949656'] = self.var_7c9811e7_d0a0_479d_b602_0d1d15949656.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_936537c7_3759_45ce_a8a8_b838693718a7 + if self.var_936537c7_3759_45ce_a8a8_b838693718a7: + _dict['936537c7-3759-45ce-a8a8-b838693718a7'] = self.var_936537c7_3759_45ce_a8a8_b838693718a7.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NoOp200Response5 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "3de80657-3122-467c-b3fe-9bb7c8c8f688": OrganizationServiceAddHumanUserRequest.from_dict(obj["3de80657-3122-467c-b3fe-9bb7c8c8f688"]) if obj.get("3de80657-3122-467c-b3fe-9bb7c8c8f688") is not None else None, + "041c9d52-fb9b-4965-b5e3-e73b4dfe6b8d": obj.get("041c9d52-fb9b-4965-b5e3-e73b4dfe6b8d"), + "43448de5-7b8c-4175-8128-539e3bd683b8": OrganizationServiceHashedPassword.from_dict(obj["43448de5-7b8c-4175-8128-539e3bd683b8"]) if obj.get("43448de5-7b8c-4175-8128-539e3bd683b8") is not None else None, + "da03a614-06de-495f-afbe-50bfc4cbea82": OrganizationServiceOrganizationDomainQuery.from_dict(obj["da03a614-06de-495f-afbe-50bfc4cbea82"]) if obj.get("da03a614-06de-495f-afbe-50bfc4cbea82") is not None else None, + "6e5d43ff-2490-4085-beda-32e8ba0001b7": OrganizationServiceOrganizationIDQuery.from_dict(obj["6e5d43ff-2490-4085-beda-32e8ba0001b7"]) if obj.get("6e5d43ff-2490-4085-beda-32e8ba0001b7") is not None else None, + "cac83893-051f-44b1-94b6-79fceb34af1e": OrganizationServiceOrganizationNameQuery.from_dict(obj["cac83893-051f-44b1-94b6-79fceb34af1e"]) if obj.get("cac83893-051f-44b1-94b6-79fceb34af1e") is not None else None, + "ce42e35c-218e-4ad8-9dd8-683e1c958d38": OrganizationServiceOrganizationStateQuery.from_dict(obj["ce42e35c-218e-4ad8-9dd8-683e1c958d38"]) if obj.get("ce42e35c-218e-4ad8-9dd8-683e1c958d38") is not None else None, + "7c9811e7-d0a0-479d-b602-0d1d15949656": OrganizationServicePassword.from_dict(obj["7c9811e7-d0a0-479d-b602-0d1d15949656"]) if obj.get("7c9811e7-d0a0-479d-b602-0d1d15949656") is not None else None, + "e893119e-bea6-4baf-9fec-4f7db0b74899": obj.get("e893119e-bea6-4baf-9fec-4f7db0b74899"), + "a30c914a-2359-4acb-8b3d-63e3c075bc2e": obj.get("a30c914a-2359-4acb-8b3d-63e3c075bc2e"), + "936537c7-3759-45ce-a8a8-b838693718a7": OrganizationServiceSendEmailVerificationCode.from_dict(obj["936537c7-3759-45ce-a8a8-b838693718a7"]) if obj.get("936537c7-3759-45ce-a8a8-b838693718a7") is not None else None, + "a113f4e2-cc60-4075-aade-a8023c402717": obj.get("a113f4e2-cc60-4075-aade-a8023c402717") + }) + return _obj + + diff --git a/zitadel_client/models/no_op200_response6.py b/zitadel_client/models/no_op200_response6.py new file mode 100644 index 00000000..bfc6b392 --- /dev/null +++ b/zitadel_client/models/no_op200_response6.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.oidc_service_authorization_error import OIDCServiceAuthorizationError +from zitadel_client.models.oidc_service_session import OIDCServiceSession +from typing import Optional, Set +from typing_extensions import Self + +class NoOp200Response6(BaseModel): + """ + NoOp200Response6 + """ # noqa: E501 + var_657a1510_02d0_4819_8709_e8a564439e72: Optional[OIDCServiceAuthorizationError] = Field(default=None, alias="657a1510-02d0-4819-8709-e8a564439e72") + d41bd83a_fd7f_4361_94df_6787c25b0e12: Optional[Dict[str, Any]] = Field(default=None, alias="d41bd83a-fd7f-4361-94df-6787c25b0e12") + bbaa2ff9_2c76_4356_b631_c6a3eb56b87f: Optional[OIDCServiceSession] = Field(default=None, alias="bbaa2ff9-2c76-4356-b631-c6a3eb56b87f") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NoOp200Response6 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_657a1510_02d0_4819_8709_e8a564439e72 + if self.var_657a1510_02d0_4819_8709_e8a564439e72: + _dict['657a1510-02d0-4819-8709-e8a564439e72'] = self.var_657a1510_02d0_4819_8709_e8a564439e72.to_dict() + # override the default output from pydantic by calling `to_dict()` of bbaa2ff9_2c76_4356_b631_c6a3eb56b87f + if self.bbaa2ff9_2c76_4356_b631_c6a3eb56b87f: + _dict['bbaa2ff9-2c76-4356-b631-c6a3eb56b87f'] = self.bbaa2ff9_2c76_4356_b631_c6a3eb56b87f.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NoOp200Response6 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "657a1510-02d0-4819-8709-e8a564439e72": OIDCServiceAuthorizationError.from_dict(obj["657a1510-02d0-4819-8709-e8a564439e72"]) if obj.get("657a1510-02d0-4819-8709-e8a564439e72") is not None else None, + "d41bd83a-fd7f-4361-94df-6787c25b0e12": obj.get("d41bd83a-fd7f-4361-94df-6787c25b0e12"), + "bbaa2ff9-2c76-4356-b631-c6a3eb56b87f": OIDCServiceSession.from_dict(obj["bbaa2ff9-2c76-4356-b631-c6a3eb56b87f"]) if obj.get("bbaa2ff9-2c76-4356-b631-c6a3eb56b87f") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/no_op200_response7.py b/zitadel_client/models/no_op200_response7.py new file mode 100644 index 00000000..3516acfe --- /dev/null +++ b/zitadel_client/models/no_op200_response7.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.saml_service_authorization_error import SAMLServiceAuthorizationError +from zitadel_client.models.saml_service_post_response import SAMLServicePostResponse +from zitadel_client.models.saml_service_session import SAMLServiceSession +from typing import Optional, Set +from typing_extensions import Self + +class NoOp200Response7(BaseModel): + """ + NoOp200Response7 + """ # noqa: E501 + var_32657d17_3e6d_45c6_b95a_57f0927e4246: Optional[SAMLServiceAuthorizationError] = Field(default=None, alias="32657d17-3e6d-45c6-b95a-57f0927e4246") + a730faa0_963c_46f7_b1b3_a7b2d884d7c8: Optional[SAMLServicePostResponse] = Field(default=None, alias="a730faa0-963c-46f7-b1b3-a7b2d884d7c8") + e07bfd13_bce5_4fd7_be03_0e46462e5dea: Optional[Dict[str, Any]] = Field(default=None, alias="e07bfd13-bce5-4fd7-be03-0e46462e5dea") + e3919a44_f603_416e_86e3_1abcc6493639: Optional[SAMLServiceSession] = Field(default=None, alias="e3919a44-f603-416e-86e3-1abcc6493639") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NoOp200Response7 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_32657d17_3e6d_45c6_b95a_57f0927e4246 + if self.var_32657d17_3e6d_45c6_b95a_57f0927e4246: + _dict['32657d17-3e6d-45c6-b95a-57f0927e4246'] = self.var_32657d17_3e6d_45c6_b95a_57f0927e4246.to_dict() + # override the default output from pydantic by calling `to_dict()` of a730faa0_963c_46f7_b1b3_a7b2d884d7c8 + if self.a730faa0_963c_46f7_b1b3_a7b2d884d7c8: + _dict['a730faa0-963c-46f7-b1b3-a7b2d884d7c8'] = self.a730faa0_963c_46f7_b1b3_a7b2d884d7c8.to_dict() + # override the default output from pydantic by calling `to_dict()` of e3919a44_f603_416e_86e3_1abcc6493639 + if self.e3919a44_f603_416e_86e3_1abcc6493639: + _dict['e3919a44-f603-416e-86e3-1abcc6493639'] = self.e3919a44_f603_416e_86e3_1abcc6493639.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NoOp200Response7 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "32657d17-3e6d-45c6-b95a-57f0927e4246": SAMLServiceAuthorizationError.from_dict(obj["32657d17-3e6d-45c6-b95a-57f0927e4246"]) if obj.get("32657d17-3e6d-45c6-b95a-57f0927e4246") is not None else None, + "a730faa0-963c-46f7-b1b3-a7b2d884d7c8": SAMLServicePostResponse.from_dict(obj["a730faa0-963c-46f7-b1b3-a7b2d884d7c8"]) if obj.get("a730faa0-963c-46f7-b1b3-a7b2d884d7c8") is not None else None, + "e07bfd13-bce5-4fd7-be03-0e46462e5dea": obj.get("e07bfd13-bce5-4fd7-be03-0e46462e5dea"), + "e3919a44-f603-416e-86e3-1abcc6493639": SAMLServiceSession.from_dict(obj["e3919a44-f603-416e-86e3-1abcc6493639"]) if obj.get("e3919a44-f603-416e-86e3-1abcc6493639") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/no_op200_response8.py b/zitadel_client/models/no_op200_response8.py new file mode 100644 index 00000000..53ba9ab9 --- /dev/null +++ b/zitadel_client/models/no_op200_response8.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_action_service_event_execution import BetaActionServiceEventExecution +from zitadel_client.models.beta_action_service_execution_type_filter import BetaActionServiceExecutionTypeFilter +from zitadel_client.models.beta_action_service_function_execution import BetaActionServiceFunctionExecution +from zitadel_client.models.beta_action_service_in_conditions_filter import BetaActionServiceInConditionsFilter +from zitadel_client.models.beta_action_service_in_target_ids_filter import BetaActionServiceInTargetIDsFilter +from zitadel_client.models.beta_action_service_request_execution import BetaActionServiceRequestExecution +from zitadel_client.models.beta_action_service_response_execution import BetaActionServiceResponseExecution +from zitadel_client.models.beta_action_service_rest_call import BetaActionServiceRESTCall +from zitadel_client.models.beta_action_service_rest_webhook import BetaActionServiceRESTWebhook +from zitadel_client.models.beta_action_service_target_filter import BetaActionServiceTargetFilter +from zitadel_client.models.beta_action_service_target_name_filter import BetaActionServiceTargetNameFilter +from typing import Optional, Set +from typing_extensions import Self + +class NoOp200Response8(BaseModel): + """ + NoOp200Response8 + """ # noqa: E501 + var_14ac2377_cd9b_4f16_9d80_a66a566a95b0: Optional[BetaActionServiceEventExecution] = Field(default=None, alias="14ac2377-cd9b-4f16-9d80-a66a566a95b0") + var_56580d8f_e0ad_46dd_be7f_a67863e3243a: Optional[BetaActionServiceExecutionTypeFilter] = Field(default=None, alias="56580d8f-e0ad-46dd-be7f-a67863e3243a") + var_47a5b3b7_e839_43a9_b218_71c287a9b231: Optional[BetaActionServiceFunctionExecution] = Field(default=None, alias="47a5b3b7-e839-43a9-b218-71c287a9b231") + var_4194bba8_4b78_4ab6_9417_213a2fa58047: Optional[BetaActionServiceInConditionsFilter] = Field(default=None, alias="4194bba8-4b78-4ab6-9417-213a2fa58047") + var_0a69376f_e56d_4d89_9c20_10adfb7587d2: Optional[BetaActionServiceInTargetIDsFilter] = Field(default=None, alias="0a69376f-e56d-4d89-9c20-10adfb7587d2") + eac0faf6_b0fc_4215_aea0_b519f2e25b3c: Optional[Dict[str, Any]] = Field(default=None, alias="eac0faf6-b0fc-4215-aea0-b519f2e25b3c") + var_8a866c3c_e930_4ab4_a3d9_c6ffe2e5f7fe: Optional[BetaActionServiceRESTCall] = Field(default=None, alias="8a866c3c-e930-4ab4-a3d9-c6ffe2e5f7fe") + var_61271a2d_e5d4_473b_b029_d5b65fcc01d9: Optional[BetaActionServiceRESTWebhook] = Field(default=None, alias="61271a2d-e5d4-473b-b029-d5b65fcc01d9") + var_08f251a1_032b_4a98_817e_0e83e2e13897: Optional[BetaActionServiceRequestExecution] = Field(default=None, alias="08f251a1-032b-4a98-817e-0e83e2e13897") + b9ded75c_6738_41c1_bf74_d2a913501439: Optional[BetaActionServiceResponseExecution] = Field(default=None, alias="b9ded75c-6738-41c1-bf74-d2a913501439") + var_03eb18ce_c664_4f97_956b_ba1376a31702: Optional[BetaActionServiceTargetFilter] = Field(default=None, alias="03eb18ce-c664-4f97-956b-ba1376a31702") + e3f9ea2f_fc1d_40af_8c51_a1f0c8905ee5: Optional[BetaActionServiceTargetNameFilter] = Field(default=None, alias="e3f9ea2f-fc1d-40af-8c51-a1f0c8905ee5") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NoOp200Response8 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_14ac2377_cd9b_4f16_9d80_a66a566a95b0 + if self.var_14ac2377_cd9b_4f16_9d80_a66a566a95b0: + _dict['14ac2377-cd9b-4f16-9d80-a66a566a95b0'] = self.var_14ac2377_cd9b_4f16_9d80_a66a566a95b0.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_56580d8f_e0ad_46dd_be7f_a67863e3243a + if self.var_56580d8f_e0ad_46dd_be7f_a67863e3243a: + _dict['56580d8f-e0ad-46dd-be7f-a67863e3243a'] = self.var_56580d8f_e0ad_46dd_be7f_a67863e3243a.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_47a5b3b7_e839_43a9_b218_71c287a9b231 + if self.var_47a5b3b7_e839_43a9_b218_71c287a9b231: + _dict['47a5b3b7-e839-43a9-b218-71c287a9b231'] = self.var_47a5b3b7_e839_43a9_b218_71c287a9b231.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_4194bba8_4b78_4ab6_9417_213a2fa58047 + if self.var_4194bba8_4b78_4ab6_9417_213a2fa58047: + _dict['4194bba8-4b78-4ab6-9417-213a2fa58047'] = self.var_4194bba8_4b78_4ab6_9417_213a2fa58047.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_0a69376f_e56d_4d89_9c20_10adfb7587d2 + if self.var_0a69376f_e56d_4d89_9c20_10adfb7587d2: + _dict['0a69376f-e56d-4d89-9c20-10adfb7587d2'] = self.var_0a69376f_e56d_4d89_9c20_10adfb7587d2.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_8a866c3c_e930_4ab4_a3d9_c6ffe2e5f7fe + if self.var_8a866c3c_e930_4ab4_a3d9_c6ffe2e5f7fe: + _dict['8a866c3c-e930-4ab4-a3d9-c6ffe2e5f7fe'] = self.var_8a866c3c_e930_4ab4_a3d9_c6ffe2e5f7fe.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_61271a2d_e5d4_473b_b029_d5b65fcc01d9 + if self.var_61271a2d_e5d4_473b_b029_d5b65fcc01d9: + _dict['61271a2d-e5d4-473b-b029-d5b65fcc01d9'] = self.var_61271a2d_e5d4_473b_b029_d5b65fcc01d9.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_08f251a1_032b_4a98_817e_0e83e2e13897 + if self.var_08f251a1_032b_4a98_817e_0e83e2e13897: + _dict['08f251a1-032b-4a98-817e-0e83e2e13897'] = self.var_08f251a1_032b_4a98_817e_0e83e2e13897.to_dict() + # override the default output from pydantic by calling `to_dict()` of b9ded75c_6738_41c1_bf74_d2a913501439 + if self.b9ded75c_6738_41c1_bf74_d2a913501439: + _dict['b9ded75c-6738-41c1-bf74-d2a913501439'] = self.b9ded75c_6738_41c1_bf74_d2a913501439.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_03eb18ce_c664_4f97_956b_ba1376a31702 + if self.var_03eb18ce_c664_4f97_956b_ba1376a31702: + _dict['03eb18ce-c664-4f97-956b-ba1376a31702'] = self.var_03eb18ce_c664_4f97_956b_ba1376a31702.to_dict() + # override the default output from pydantic by calling `to_dict()` of e3f9ea2f_fc1d_40af_8c51_a1f0c8905ee5 + if self.e3f9ea2f_fc1d_40af_8c51_a1f0c8905ee5: + _dict['e3f9ea2f-fc1d-40af-8c51-a1f0c8905ee5'] = self.e3f9ea2f_fc1d_40af_8c51_a1f0c8905ee5.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NoOp200Response8 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "14ac2377-cd9b-4f16-9d80-a66a566a95b0": BetaActionServiceEventExecution.from_dict(obj["14ac2377-cd9b-4f16-9d80-a66a566a95b0"]) if obj.get("14ac2377-cd9b-4f16-9d80-a66a566a95b0") is not None else None, + "56580d8f-e0ad-46dd-be7f-a67863e3243a": BetaActionServiceExecutionTypeFilter.from_dict(obj["56580d8f-e0ad-46dd-be7f-a67863e3243a"]) if obj.get("56580d8f-e0ad-46dd-be7f-a67863e3243a") is not None else None, + "47a5b3b7-e839-43a9-b218-71c287a9b231": BetaActionServiceFunctionExecution.from_dict(obj["47a5b3b7-e839-43a9-b218-71c287a9b231"]) if obj.get("47a5b3b7-e839-43a9-b218-71c287a9b231") is not None else None, + "4194bba8-4b78-4ab6-9417-213a2fa58047": BetaActionServiceInConditionsFilter.from_dict(obj["4194bba8-4b78-4ab6-9417-213a2fa58047"]) if obj.get("4194bba8-4b78-4ab6-9417-213a2fa58047") is not None else None, + "0a69376f-e56d-4d89-9c20-10adfb7587d2": BetaActionServiceInTargetIDsFilter.from_dict(obj["0a69376f-e56d-4d89-9c20-10adfb7587d2"]) if obj.get("0a69376f-e56d-4d89-9c20-10adfb7587d2") is not None else None, + "eac0faf6-b0fc-4215-aea0-b519f2e25b3c": obj.get("eac0faf6-b0fc-4215-aea0-b519f2e25b3c"), + "8a866c3c-e930-4ab4-a3d9-c6ffe2e5f7fe": BetaActionServiceRESTCall.from_dict(obj["8a866c3c-e930-4ab4-a3d9-c6ffe2e5f7fe"]) if obj.get("8a866c3c-e930-4ab4-a3d9-c6ffe2e5f7fe") is not None else None, + "61271a2d-e5d4-473b-b029-d5b65fcc01d9": BetaActionServiceRESTWebhook.from_dict(obj["61271a2d-e5d4-473b-b029-d5b65fcc01d9"]) if obj.get("61271a2d-e5d4-473b-b029-d5b65fcc01d9") is not None else None, + "08f251a1-032b-4a98-817e-0e83e2e13897": BetaActionServiceRequestExecution.from_dict(obj["08f251a1-032b-4a98-817e-0e83e2e13897"]) if obj.get("08f251a1-032b-4a98-817e-0e83e2e13897") is not None else None, + "b9ded75c-6738-41c1-bf74-d2a913501439": BetaActionServiceResponseExecution.from_dict(obj["b9ded75c-6738-41c1-bf74-d2a913501439"]) if obj.get("b9ded75c-6738-41c1-bf74-d2a913501439") is not None else None, + "03eb18ce-c664-4f97-956b-ba1376a31702": BetaActionServiceTargetFilter.from_dict(obj["03eb18ce-c664-4f97-956b-ba1376a31702"]) if obj.get("03eb18ce-c664-4f97-956b-ba1376a31702") is not None else None, + "e3f9ea2f-fc1d-40af-8c51-a1f0c8905ee5": BetaActionServiceTargetNameFilter.from_dict(obj["e3f9ea2f-fc1d-40af-8c51-a1f0c8905ee5"]) if obj.get("e3f9ea2f-fc1d-40af-8c51-a1f0c8905ee5") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/no_op200_response9.py b/zitadel_client/models/no_op200_response9.py new file mode 100644 index 00000000..0fa225bc --- /dev/null +++ b/zitadel_client/models/no_op200_response9.py @@ -0,0 +1,268 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_and_query import BetaUserServiceAndQuery +from zitadel_client.models.beta_user_service_display_name_query import BetaUserServiceDisplayNameQuery +from zitadel_client.models.beta_user_service_email_query import BetaUserServiceEmailQuery +from zitadel_client.models.beta_user_service_first_name_query import BetaUserServiceFirstNameQuery +from zitadel_client.models.beta_user_service_hashed_password import BetaUserServiceHashedPassword +from zitadel_client.models.beta_user_service_human_user import BetaUserServiceHumanUser +from zitadel_client.models.beta_user_service_idp_intent import BetaUserServiceIDPIntent +from zitadel_client.models.beta_user_service_idpldap_access_information import BetaUserServiceIDPLDAPAccessInformation +from zitadel_client.models.beta_user_service_idpo_auth_access_information import BetaUserServiceIDPOAuthAccessInformation +from zitadel_client.models.beta_user_service_idpsaml_access_information import BetaUserServiceIDPSAMLAccessInformation +from zitadel_client.models.beta_user_service_in_user_emails_query import BetaUserServiceInUserEmailsQuery +from zitadel_client.models.beta_user_service_in_user_id_query import BetaUserServiceInUserIDQuery +from zitadel_client.models.beta_user_service_last_name_query import BetaUserServiceLastNameQuery +from zitadel_client.models.beta_user_service_ldap_credentials import BetaUserServiceLDAPCredentials +from zitadel_client.models.beta_user_service_login_name_query import BetaUserServiceLoginNameQuery +from zitadel_client.models.beta_user_service_machine_user import BetaUserServiceMachineUser +from zitadel_client.models.beta_user_service_nick_name_query import BetaUserServiceNickNameQuery +from zitadel_client.models.beta_user_service_not_query import BetaUserServiceNotQuery +from zitadel_client.models.beta_user_service_or_query import BetaUserServiceOrQuery +from zitadel_client.models.beta_user_service_organization_id_query import BetaUserServiceOrganizationIdQuery +from zitadel_client.models.beta_user_service_password import BetaUserServicePassword +from zitadel_client.models.beta_user_service_phone_query import BetaUserServicePhoneQuery +from zitadel_client.models.beta_user_service_redirect_urls import BetaUserServiceRedirectURLs +from zitadel_client.models.beta_user_service_send_email_verification_code import BetaUserServiceSendEmailVerificationCode +from zitadel_client.models.beta_user_service_send_passkey_registration_link import BetaUserServiceSendPasskeyRegistrationLink +from zitadel_client.models.beta_user_service_send_password_reset_link import BetaUserServiceSendPasswordResetLink +from zitadel_client.models.beta_user_service_state_query import BetaUserServiceStateQuery +from zitadel_client.models.beta_user_service_type_query import BetaUserServiceTypeQuery +from zitadel_client.models.beta_user_service_user_name_query import BetaUserServiceUserNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class NoOp200Response9(BaseModel): + """ + NoOp200Response9 + """ # noqa: E501 + var_1cc1438c_f2aa_42e1_9d98_c1567ec8af8c: Optional[BetaUserServiceAndQuery] = Field(default=None, alias="1cc1438c-f2aa-42e1-9d98-c1567ec8af8c") + b61e6384_2512_4460_bf9f_abac97970816: Optional[BetaUserServiceDisplayNameQuery] = Field(default=None, alias="b61e6384-2512-4460-bf9f-abac97970816") + b1a44e52_5396_4bc1_a025_4cf775f8e992: Optional[BetaUserServiceEmailQuery] = Field(default=None, alias="b1a44e52-5396-4bc1-a025-4cf775f8e992") + var_985a7ba6_43bd_451f_a766_2a14943fa1e2: Optional[BetaUserServiceFirstNameQuery] = Field(default=None, alias="985a7ba6-43bd-451f-a766-2a14943fa1e2") + fa6665bb_6140_4917_b7e8_10013ead5523: Optional[BetaUserServiceHashedPassword] = Field(default=None, alias="fa6665bb-6140-4917-b7e8-10013ead5523") + var_187dcfaf_5461_4d62_a811_369e9f1cbdd0: Optional[BetaUserServiceHumanUser] = Field(default=None, alias="187dcfaf-5461-4d62-a811-369e9f1cbdd0") + f606086c_a1f0_4252_aa0e_c9257a1ce09e: Optional[BetaUserServiceIDPIntent] = Field(default=None, alias="f606086c-a1f0-4252-aa0e-c9257a1ce09e") + var_3a4b39c4_e4e2_4cb2_b76a_8eb63380fb95: Optional[BetaUserServiceIDPLDAPAccessInformation] = Field(default=None, alias="3a4b39c4-e4e2-4cb2-b76a-8eb63380fb95") + var_22688e84_5af5_4ffd_a6f7_b4fba80e089c: Optional[BetaUserServiceIDPOAuthAccessInformation] = Field(default=None, alias="22688e84-5af5-4ffd-a6f7-b4fba80e089c") + c36072e3_d049_4926_a9e4_c65d0c5a10dc: Optional[BetaUserServiceIDPSAMLAccessInformation] = Field(default=None, alias="c36072e3-d049-4926-a9e4-c65d0c5a10dc") + var_1d1dab5e_1bca_4b1e_a135_5908581a0c4b: Optional[BetaUserServiceInUserEmailsQuery] = Field(default=None, alias="1d1dab5e-1bca-4b1e-a135-5908581a0c4b") + var_2a4415c6_c97a_4a46_b126_c81a69244753: Optional[BetaUserServiceInUserIDQuery] = Field(default=None, alias="2a4415c6-c97a-4a46-b126-c81a69244753") + e4c28790_5159_44c6_b27e_54f206002e4c: Optional[BetaUserServiceLDAPCredentials] = Field(default=None, alias="e4c28790-5159-44c6-b27e-54f206002e4c") + c6bec6fe_b6e4_4ecc_aa6d_cc7297bfe62b: Optional[BetaUserServiceLastNameQuery] = Field(default=None, alias="c6bec6fe-b6e4-4ecc-aa6d-cc7297bfe62b") + e5bc65c9_7231_493d_8470_81a22f081b4f: Optional[BetaUserServiceLoginNameQuery] = Field(default=None, alias="e5bc65c9-7231-493d-8470-81a22f081b4f") + var_192248a0_7f50_4402_b495_b4a35f7a9ae3: Optional[BetaUserServiceMachineUser] = Field(default=None, alias="192248a0-7f50-4402-b495-b4a35f7a9ae3") + var_8ef063a8_5bb9_461d_906d_d12528f4b4ed: Optional[BetaUserServiceNickNameQuery] = Field(default=None, alias="8ef063a8-5bb9-461d-906d-d12528f4b4ed") + var_78bb23de_11f1_4fd5_91bd_f5ccef7641d8: Optional[BetaUserServiceNotQuery] = Field(default=None, alias="78bb23de-11f1-4fd5-91bd-f5ccef7641d8") + var_43cd5f19_4ff7_47b4_8c2f_5b1ed0e089bf: Optional[BetaUserServiceOrQuery] = Field(default=None, alias="43cd5f19-4ff7-47b4-8c2f-5b1ed0e089bf") + var_5f781d8a_0bf1_4f52_88fa_f8aaa55ed7b0: Optional[BetaUserServiceOrganizationIdQuery] = Field(default=None, alias="5f781d8a-0bf1-4f52-88fa-f8aaa55ed7b0") + a9615884_cf80_44bc_961c_855add7d004b: Optional[BetaUserServicePassword] = Field(default=None, alias="a9615884-cf80-44bc-961c-855add7d004b") + bb2a5426_2230_480b_ad61_4c39036acff9: Optional[BetaUserServicePhoneQuery] = Field(default=None, alias="bb2a5426-2230-480b-ad61-4c39036acff9") + var_611b753b_21ac_45af_a9ac_e07bb3d66bae: Optional[BetaUserServiceRedirectURLs] = Field(default=None, alias="611b753b-21ac-45af-a9ac-e07bb3d66bae") + c194615f_8149_4436_a1a0_1e84ed67a1a2: Optional[Dict[str, Any]] = Field(default=None, alias="c194615f-8149-4436-a1a0-1e84ed67a1a2") + a2996439_e9ff_4c82_9e49_ce4b5176fef4: Optional[Dict[str, Any]] = Field(default=None, alias="a2996439-e9ff-4c82-9e49-ce4b5176fef4") + var_88d21019_2490_4616_b136_a04242465bbd: Optional[Dict[str, Any]] = Field(default=None, alias="88d21019-2490-4616-b136-a04242465bbd") + var_04271275_2b99_426b_b14b_a3e7b47707a9: Optional[Dict[str, Any]] = Field(default=None, alias="04271275-2b99-426b-b14b-a3e7b47707a9") + b88f4644_562f_48a4_9765_3831764db916: Optional[BetaUserServiceSendEmailVerificationCode] = Field(default=None, alias="b88f4644-562f-48a4-9765-3831764db916") + var_29a84655_a802_4923_8d6a_dd5b422cd504: Optional[BetaUserServiceSendPasskeyRegistrationLink] = Field(default=None, alias="29a84655-a802-4923-8d6a-dd5b422cd504") + var_2b14cb59_05be_48b8_9614_f8782ba46ab0: Optional[BetaUserServiceSendPasswordResetLink] = Field(default=None, alias="2b14cb59-05be-48b8-9614-f8782ba46ab0") + var_1261f6c3_53ec_43f4_8bc6_64a251556e1e: Optional[Dict[str, Any]] = Field(default=None, alias="1261f6c3-53ec-43f4-8bc6-64a251556e1e") + var_6b3cf3a1_1c1e_4f0a_9f6c_71e615eb8a1f: Optional[BetaUserServiceStateQuery] = Field(default=None, alias="6b3cf3a1-1c1e-4f0a-9f6c-71e615eb8a1f") + var_58330153_8024_414a_a7bf_61669352622c: Optional[BetaUserServiceTypeQuery] = Field(default=None, alias="58330153-8024-414a-a7bf-61669352622c") + var_6eb37c86_e5dd_4013_af9e_66bd404630be: Optional[BetaUserServiceUserNameQuery] = Field(default=None, alias="6eb37c86-e5dd-4013-af9e-66bd404630be") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NoOp200Response9 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_1cc1438c_f2aa_42e1_9d98_c1567ec8af8c + if self.var_1cc1438c_f2aa_42e1_9d98_c1567ec8af8c: + _dict['1cc1438c-f2aa-42e1-9d98-c1567ec8af8c'] = self.var_1cc1438c_f2aa_42e1_9d98_c1567ec8af8c.to_dict() + # override the default output from pydantic by calling `to_dict()` of b61e6384_2512_4460_bf9f_abac97970816 + if self.b61e6384_2512_4460_bf9f_abac97970816: + _dict['b61e6384-2512-4460-bf9f-abac97970816'] = self.b61e6384_2512_4460_bf9f_abac97970816.to_dict() + # override the default output from pydantic by calling `to_dict()` of b1a44e52_5396_4bc1_a025_4cf775f8e992 + if self.b1a44e52_5396_4bc1_a025_4cf775f8e992: + _dict['b1a44e52-5396-4bc1-a025-4cf775f8e992'] = self.b1a44e52_5396_4bc1_a025_4cf775f8e992.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_985a7ba6_43bd_451f_a766_2a14943fa1e2 + if self.var_985a7ba6_43bd_451f_a766_2a14943fa1e2: + _dict['985a7ba6-43bd-451f-a766-2a14943fa1e2'] = self.var_985a7ba6_43bd_451f_a766_2a14943fa1e2.to_dict() + # override the default output from pydantic by calling `to_dict()` of fa6665bb_6140_4917_b7e8_10013ead5523 + if self.fa6665bb_6140_4917_b7e8_10013ead5523: + _dict['fa6665bb-6140-4917-b7e8-10013ead5523'] = self.fa6665bb_6140_4917_b7e8_10013ead5523.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_187dcfaf_5461_4d62_a811_369e9f1cbdd0 + if self.var_187dcfaf_5461_4d62_a811_369e9f1cbdd0: + _dict['187dcfaf-5461-4d62-a811-369e9f1cbdd0'] = self.var_187dcfaf_5461_4d62_a811_369e9f1cbdd0.to_dict() + # override the default output from pydantic by calling `to_dict()` of f606086c_a1f0_4252_aa0e_c9257a1ce09e + if self.f606086c_a1f0_4252_aa0e_c9257a1ce09e: + _dict['f606086c-a1f0-4252-aa0e-c9257a1ce09e'] = self.f606086c_a1f0_4252_aa0e_c9257a1ce09e.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_3a4b39c4_e4e2_4cb2_b76a_8eb63380fb95 + if self.var_3a4b39c4_e4e2_4cb2_b76a_8eb63380fb95: + _dict['3a4b39c4-e4e2-4cb2-b76a-8eb63380fb95'] = self.var_3a4b39c4_e4e2_4cb2_b76a_8eb63380fb95.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_22688e84_5af5_4ffd_a6f7_b4fba80e089c + if self.var_22688e84_5af5_4ffd_a6f7_b4fba80e089c: + _dict['22688e84-5af5-4ffd-a6f7-b4fba80e089c'] = self.var_22688e84_5af5_4ffd_a6f7_b4fba80e089c.to_dict() + # override the default output from pydantic by calling `to_dict()` of c36072e3_d049_4926_a9e4_c65d0c5a10dc + if self.c36072e3_d049_4926_a9e4_c65d0c5a10dc: + _dict['c36072e3-d049-4926-a9e4-c65d0c5a10dc'] = self.c36072e3_d049_4926_a9e4_c65d0c5a10dc.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_1d1dab5e_1bca_4b1e_a135_5908581a0c4b + if self.var_1d1dab5e_1bca_4b1e_a135_5908581a0c4b: + _dict['1d1dab5e-1bca-4b1e-a135-5908581a0c4b'] = self.var_1d1dab5e_1bca_4b1e_a135_5908581a0c4b.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_2a4415c6_c97a_4a46_b126_c81a69244753 + if self.var_2a4415c6_c97a_4a46_b126_c81a69244753: + _dict['2a4415c6-c97a-4a46-b126-c81a69244753'] = self.var_2a4415c6_c97a_4a46_b126_c81a69244753.to_dict() + # override the default output from pydantic by calling `to_dict()` of e4c28790_5159_44c6_b27e_54f206002e4c + if self.e4c28790_5159_44c6_b27e_54f206002e4c: + _dict['e4c28790-5159-44c6-b27e-54f206002e4c'] = self.e4c28790_5159_44c6_b27e_54f206002e4c.to_dict() + # override the default output from pydantic by calling `to_dict()` of c6bec6fe_b6e4_4ecc_aa6d_cc7297bfe62b + if self.c6bec6fe_b6e4_4ecc_aa6d_cc7297bfe62b: + _dict['c6bec6fe-b6e4-4ecc-aa6d-cc7297bfe62b'] = self.c6bec6fe_b6e4_4ecc_aa6d_cc7297bfe62b.to_dict() + # override the default output from pydantic by calling `to_dict()` of e5bc65c9_7231_493d_8470_81a22f081b4f + if self.e5bc65c9_7231_493d_8470_81a22f081b4f: + _dict['e5bc65c9-7231-493d-8470-81a22f081b4f'] = self.e5bc65c9_7231_493d_8470_81a22f081b4f.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_192248a0_7f50_4402_b495_b4a35f7a9ae3 + if self.var_192248a0_7f50_4402_b495_b4a35f7a9ae3: + _dict['192248a0-7f50-4402-b495-b4a35f7a9ae3'] = self.var_192248a0_7f50_4402_b495_b4a35f7a9ae3.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_8ef063a8_5bb9_461d_906d_d12528f4b4ed + if self.var_8ef063a8_5bb9_461d_906d_d12528f4b4ed: + _dict['8ef063a8-5bb9-461d-906d-d12528f4b4ed'] = self.var_8ef063a8_5bb9_461d_906d_d12528f4b4ed.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_78bb23de_11f1_4fd5_91bd_f5ccef7641d8 + if self.var_78bb23de_11f1_4fd5_91bd_f5ccef7641d8: + _dict['78bb23de-11f1-4fd5-91bd-f5ccef7641d8'] = self.var_78bb23de_11f1_4fd5_91bd_f5ccef7641d8.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_43cd5f19_4ff7_47b4_8c2f_5b1ed0e089bf + if self.var_43cd5f19_4ff7_47b4_8c2f_5b1ed0e089bf: + _dict['43cd5f19-4ff7-47b4-8c2f-5b1ed0e089bf'] = self.var_43cd5f19_4ff7_47b4_8c2f_5b1ed0e089bf.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_5f781d8a_0bf1_4f52_88fa_f8aaa55ed7b0 + if self.var_5f781d8a_0bf1_4f52_88fa_f8aaa55ed7b0: + _dict['5f781d8a-0bf1-4f52-88fa-f8aaa55ed7b0'] = self.var_5f781d8a_0bf1_4f52_88fa_f8aaa55ed7b0.to_dict() + # override the default output from pydantic by calling `to_dict()` of a9615884_cf80_44bc_961c_855add7d004b + if self.a9615884_cf80_44bc_961c_855add7d004b: + _dict['a9615884-cf80-44bc-961c-855add7d004b'] = self.a9615884_cf80_44bc_961c_855add7d004b.to_dict() + # override the default output from pydantic by calling `to_dict()` of bb2a5426_2230_480b_ad61_4c39036acff9 + if self.bb2a5426_2230_480b_ad61_4c39036acff9: + _dict['bb2a5426-2230-480b-ad61-4c39036acff9'] = self.bb2a5426_2230_480b_ad61_4c39036acff9.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_611b753b_21ac_45af_a9ac_e07bb3d66bae + if self.var_611b753b_21ac_45af_a9ac_e07bb3d66bae: + _dict['611b753b-21ac-45af-a9ac-e07bb3d66bae'] = self.var_611b753b_21ac_45af_a9ac_e07bb3d66bae.to_dict() + # override the default output from pydantic by calling `to_dict()` of b88f4644_562f_48a4_9765_3831764db916 + if self.b88f4644_562f_48a4_9765_3831764db916: + _dict['b88f4644-562f-48a4-9765-3831764db916'] = self.b88f4644_562f_48a4_9765_3831764db916.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_29a84655_a802_4923_8d6a_dd5b422cd504 + if self.var_29a84655_a802_4923_8d6a_dd5b422cd504: + _dict['29a84655-a802-4923-8d6a-dd5b422cd504'] = self.var_29a84655_a802_4923_8d6a_dd5b422cd504.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_2b14cb59_05be_48b8_9614_f8782ba46ab0 + if self.var_2b14cb59_05be_48b8_9614_f8782ba46ab0: + _dict['2b14cb59-05be-48b8-9614-f8782ba46ab0'] = self.var_2b14cb59_05be_48b8_9614_f8782ba46ab0.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_6b3cf3a1_1c1e_4f0a_9f6c_71e615eb8a1f + if self.var_6b3cf3a1_1c1e_4f0a_9f6c_71e615eb8a1f: + _dict['6b3cf3a1-1c1e-4f0a-9f6c-71e615eb8a1f'] = self.var_6b3cf3a1_1c1e_4f0a_9f6c_71e615eb8a1f.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_58330153_8024_414a_a7bf_61669352622c + if self.var_58330153_8024_414a_a7bf_61669352622c: + _dict['58330153-8024-414a-a7bf-61669352622c'] = self.var_58330153_8024_414a_a7bf_61669352622c.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_6eb37c86_e5dd_4013_af9e_66bd404630be + if self.var_6eb37c86_e5dd_4013_af9e_66bd404630be: + _dict['6eb37c86-e5dd-4013-af9e-66bd404630be'] = self.var_6eb37c86_e5dd_4013_af9e_66bd404630be.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NoOp200Response9 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "1cc1438c-f2aa-42e1-9d98-c1567ec8af8c": BetaUserServiceAndQuery.from_dict(obj["1cc1438c-f2aa-42e1-9d98-c1567ec8af8c"]) if obj.get("1cc1438c-f2aa-42e1-9d98-c1567ec8af8c") is not None else None, + "b61e6384-2512-4460-bf9f-abac97970816": BetaUserServiceDisplayNameQuery.from_dict(obj["b61e6384-2512-4460-bf9f-abac97970816"]) if obj.get("b61e6384-2512-4460-bf9f-abac97970816") is not None else None, + "b1a44e52-5396-4bc1-a025-4cf775f8e992": BetaUserServiceEmailQuery.from_dict(obj["b1a44e52-5396-4bc1-a025-4cf775f8e992"]) if obj.get("b1a44e52-5396-4bc1-a025-4cf775f8e992") is not None else None, + "985a7ba6-43bd-451f-a766-2a14943fa1e2": BetaUserServiceFirstNameQuery.from_dict(obj["985a7ba6-43bd-451f-a766-2a14943fa1e2"]) if obj.get("985a7ba6-43bd-451f-a766-2a14943fa1e2") is not None else None, + "fa6665bb-6140-4917-b7e8-10013ead5523": BetaUserServiceHashedPassword.from_dict(obj["fa6665bb-6140-4917-b7e8-10013ead5523"]) if obj.get("fa6665bb-6140-4917-b7e8-10013ead5523") is not None else None, + "187dcfaf-5461-4d62-a811-369e9f1cbdd0": BetaUserServiceHumanUser.from_dict(obj["187dcfaf-5461-4d62-a811-369e9f1cbdd0"]) if obj.get("187dcfaf-5461-4d62-a811-369e9f1cbdd0") is not None else None, + "f606086c-a1f0-4252-aa0e-c9257a1ce09e": BetaUserServiceIDPIntent.from_dict(obj["f606086c-a1f0-4252-aa0e-c9257a1ce09e"]) if obj.get("f606086c-a1f0-4252-aa0e-c9257a1ce09e") is not None else None, + "3a4b39c4-e4e2-4cb2-b76a-8eb63380fb95": BetaUserServiceIDPLDAPAccessInformation.from_dict(obj["3a4b39c4-e4e2-4cb2-b76a-8eb63380fb95"]) if obj.get("3a4b39c4-e4e2-4cb2-b76a-8eb63380fb95") is not None else None, + "22688e84-5af5-4ffd-a6f7-b4fba80e089c": BetaUserServiceIDPOAuthAccessInformation.from_dict(obj["22688e84-5af5-4ffd-a6f7-b4fba80e089c"]) if obj.get("22688e84-5af5-4ffd-a6f7-b4fba80e089c") is not None else None, + "c36072e3-d049-4926-a9e4-c65d0c5a10dc": BetaUserServiceIDPSAMLAccessInformation.from_dict(obj["c36072e3-d049-4926-a9e4-c65d0c5a10dc"]) if obj.get("c36072e3-d049-4926-a9e4-c65d0c5a10dc") is not None else None, + "1d1dab5e-1bca-4b1e-a135-5908581a0c4b": BetaUserServiceInUserEmailsQuery.from_dict(obj["1d1dab5e-1bca-4b1e-a135-5908581a0c4b"]) if obj.get("1d1dab5e-1bca-4b1e-a135-5908581a0c4b") is not None else None, + "2a4415c6-c97a-4a46-b126-c81a69244753": BetaUserServiceInUserIDQuery.from_dict(obj["2a4415c6-c97a-4a46-b126-c81a69244753"]) if obj.get("2a4415c6-c97a-4a46-b126-c81a69244753") is not None else None, + "e4c28790-5159-44c6-b27e-54f206002e4c": BetaUserServiceLDAPCredentials.from_dict(obj["e4c28790-5159-44c6-b27e-54f206002e4c"]) if obj.get("e4c28790-5159-44c6-b27e-54f206002e4c") is not None else None, + "c6bec6fe-b6e4-4ecc-aa6d-cc7297bfe62b": BetaUserServiceLastNameQuery.from_dict(obj["c6bec6fe-b6e4-4ecc-aa6d-cc7297bfe62b"]) if obj.get("c6bec6fe-b6e4-4ecc-aa6d-cc7297bfe62b") is not None else None, + "e5bc65c9-7231-493d-8470-81a22f081b4f": BetaUserServiceLoginNameQuery.from_dict(obj["e5bc65c9-7231-493d-8470-81a22f081b4f"]) if obj.get("e5bc65c9-7231-493d-8470-81a22f081b4f") is not None else None, + "192248a0-7f50-4402-b495-b4a35f7a9ae3": BetaUserServiceMachineUser.from_dict(obj["192248a0-7f50-4402-b495-b4a35f7a9ae3"]) if obj.get("192248a0-7f50-4402-b495-b4a35f7a9ae3") is not None else None, + "8ef063a8-5bb9-461d-906d-d12528f4b4ed": BetaUserServiceNickNameQuery.from_dict(obj["8ef063a8-5bb9-461d-906d-d12528f4b4ed"]) if obj.get("8ef063a8-5bb9-461d-906d-d12528f4b4ed") is not None else None, + "78bb23de-11f1-4fd5-91bd-f5ccef7641d8": BetaUserServiceNotQuery.from_dict(obj["78bb23de-11f1-4fd5-91bd-f5ccef7641d8"]) if obj.get("78bb23de-11f1-4fd5-91bd-f5ccef7641d8") is not None else None, + "43cd5f19-4ff7-47b4-8c2f-5b1ed0e089bf": BetaUserServiceOrQuery.from_dict(obj["43cd5f19-4ff7-47b4-8c2f-5b1ed0e089bf"]) if obj.get("43cd5f19-4ff7-47b4-8c2f-5b1ed0e089bf") is not None else None, + "5f781d8a-0bf1-4f52-88fa-f8aaa55ed7b0": BetaUserServiceOrganizationIdQuery.from_dict(obj["5f781d8a-0bf1-4f52-88fa-f8aaa55ed7b0"]) if obj.get("5f781d8a-0bf1-4f52-88fa-f8aaa55ed7b0") is not None else None, + "a9615884-cf80-44bc-961c-855add7d004b": BetaUserServicePassword.from_dict(obj["a9615884-cf80-44bc-961c-855add7d004b"]) if obj.get("a9615884-cf80-44bc-961c-855add7d004b") is not None else None, + "bb2a5426-2230-480b-ad61-4c39036acff9": BetaUserServicePhoneQuery.from_dict(obj["bb2a5426-2230-480b-ad61-4c39036acff9"]) if obj.get("bb2a5426-2230-480b-ad61-4c39036acff9") is not None else None, + "611b753b-21ac-45af-a9ac-e07bb3d66bae": BetaUserServiceRedirectURLs.from_dict(obj["611b753b-21ac-45af-a9ac-e07bb3d66bae"]) if obj.get("611b753b-21ac-45af-a9ac-e07bb3d66bae") is not None else None, + "c194615f-8149-4436-a1a0-1e84ed67a1a2": obj.get("c194615f-8149-4436-a1a0-1e84ed67a1a2"), + "a2996439-e9ff-4c82-9e49-ce4b5176fef4": obj.get("a2996439-e9ff-4c82-9e49-ce4b5176fef4"), + "88d21019-2490-4616-b136-a04242465bbd": obj.get("88d21019-2490-4616-b136-a04242465bbd"), + "04271275-2b99-426b-b14b-a3e7b47707a9": obj.get("04271275-2b99-426b-b14b-a3e7b47707a9"), + "b88f4644-562f-48a4-9765-3831764db916": BetaUserServiceSendEmailVerificationCode.from_dict(obj["b88f4644-562f-48a4-9765-3831764db916"]) if obj.get("b88f4644-562f-48a4-9765-3831764db916") is not None else None, + "29a84655-a802-4923-8d6a-dd5b422cd504": BetaUserServiceSendPasskeyRegistrationLink.from_dict(obj["29a84655-a802-4923-8d6a-dd5b422cd504"]) if obj.get("29a84655-a802-4923-8d6a-dd5b422cd504") is not None else None, + "2b14cb59-05be-48b8-9614-f8782ba46ab0": BetaUserServiceSendPasswordResetLink.from_dict(obj["2b14cb59-05be-48b8-9614-f8782ba46ab0"]) if obj.get("2b14cb59-05be-48b8-9614-f8782ba46ab0") is not None else None, + "1261f6c3-53ec-43f4-8bc6-64a251556e1e": obj.get("1261f6c3-53ec-43f4-8bc6-64a251556e1e"), + "6b3cf3a1-1c1e-4f0a-9f6c-71e615eb8a1f": BetaUserServiceStateQuery.from_dict(obj["6b3cf3a1-1c1e-4f0a-9f6c-71e615eb8a1f"]) if obj.get("6b3cf3a1-1c1e-4f0a-9f6c-71e615eb8a1f") is not None else None, + "58330153-8024-414a-a7bf-61669352622c": BetaUserServiceTypeQuery.from_dict(obj["58330153-8024-414a-a7bf-61669352622c"]) if obj.get("58330153-8024-414a-a7bf-61669352622c") is not None else None, + "6eb37c86-e5dd-4013-af9e-66bd404630be": BetaUserServiceUserNameQuery.from_dict(obj["6eb37c86-e5dd-4013-af9e-66bd404630be"]) if obj.get("6eb37c86-e5dd-4013-af9e-66bd404630be") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/not_query.py b/zitadel_client/models/not_query.py new file mode 100644 index 00000000..8599058c --- /dev/null +++ b/zitadel_client/models/not_query.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class NotQuery(BaseModel): + """ + NotQuery + """ # noqa: E501 + not_query: UserServiceNotQuery = Field(alias="notQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NotQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of not_query + if self.not_query: + _dict['notQuery'] = self.not_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NotQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "notQuery": UserServiceNotQuery.from_dict(obj["notQuery"]) if obj.get("notQuery") is not None else None + }) + return _obj + +from zitadel_client.models.user_service_not_query import UserServiceNotQuery +# TODO: Rewrite to not use raise_errors +NotQuery.model_rebuild(raise_errors=False) + diff --git a/zitadel_client/models/not_query1.py b/zitadel_client/models/not_query1.py new file mode 100644 index 00000000..24e272f5 --- /dev/null +++ b/zitadel_client/models/not_query1.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class NotQuery1(BaseModel): + """ + NotQuery1 + """ # noqa: E501 + not_query: BetaUserServiceNotQuery = Field(alias="notQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NotQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of not_query + if self.not_query: + _dict['notQuery'] = self.not_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NotQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "notQuery": BetaUserServiceNotQuery.from_dict(obj["notQuery"]) if obj.get("notQuery") is not None else None + }) + return _obj + +from zitadel_client.models.beta_user_service_not_query import BetaUserServiceNotQuery +# TODO: Rewrite to not use raise_errors +NotQuery1.model_rebuild(raise_errors=False) + diff --git a/zitadel_client/models/oauth.py b/zitadel_client/models/oauth.py new file mode 100644 index 00000000..be0cc6db --- /dev/null +++ b/zitadel_client/models/oauth.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.identity_provider_service_o_auth_config import IdentityProviderServiceOAuthConfig +from typing import Optional, Set +from typing_extensions import Self + +class Oauth(BaseModel): + """ + Oauth + """ # noqa: E501 + oauth: IdentityProviderServiceOAuthConfig + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Oauth from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of oauth + if self.oauth: + _dict['oauth'] = self.oauth.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Oauth from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "oauth": IdentityProviderServiceOAuthConfig.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/oauth1.py b/zitadel_client/models/oauth1.py new file mode 100644 index 00000000..38580f14 --- /dev/null +++ b/zitadel_client/models/oauth1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_idpo_auth_access_information import UserServiceIDPOAuthAccessInformation +from typing import Optional, Set +from typing_extensions import Self + +class Oauth1(BaseModel): + """ + Oauth1 + """ # noqa: E501 + oauth: UserServiceIDPOAuthAccessInformation + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Oauth1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of oauth + if self.oauth: + _dict['oauth'] = self.oauth.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Oauth1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "oauth": UserServiceIDPOAuthAccessInformation.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/oauth2.py b/zitadel_client/models/oauth2.py new file mode 100644 index 00000000..cff72ebb --- /dev/null +++ b/zitadel_client/models/oauth2.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_idpo_auth_access_information import BetaUserServiceIDPOAuthAccessInformation +from typing import Optional, Set +from typing_extensions import Self + +class Oauth2(BaseModel): + """ + Oauth2 + """ # noqa: E501 + oauth: BetaUserServiceIDPOAuthAccessInformation + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Oauth2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of oauth + if self.oauth: + _dict['oauth'] = self.oauth.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Oauth2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "oauth": BetaUserServiceIDPOAuthAccessInformation.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/oidc.py b/zitadel_client/models/oidc.py new file mode 100644 index 00000000..8dda1372 --- /dev/null +++ b/zitadel_client/models/oidc.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.identity_provider_service_generic_oidc_config import IdentityProviderServiceGenericOIDCConfig +from typing import Optional, Set +from typing_extensions import Self + +class Oidc(BaseModel): + """ + Oidc + """ # noqa: E501 + oidc: IdentityProviderServiceGenericOIDCConfig + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Oidc from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of oidc + if self.oidc: + _dict['oidc'] = self.oidc.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Oidc from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "oidc": IdentityProviderServiceGenericOIDCConfig.from_dict(obj["oidc"]) if obj.get("oidc") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/oidc_service_any.py b/zitadel_client/models/oidc_service_any.py new file mode 100644 index 00000000..5db8337a --- /dev/null +++ b/zitadel_client/models/oidc_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class OIDCServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OIDCServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OIDCServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/oidc_service_auth_request.py b/zitadel_client/models/oidc_service_auth_request.py index 79df6f1b..ea4ec1fa 100644 --- a/zitadel_client/models/oidc_service_auth_request.py +++ b/zitadel_client/models/oidc_service_auth_request.py @@ -28,16 +28,16 @@ class OIDCServiceAuthRequest(BaseModel): """ OIDCServiceAuthRequest """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="ID of the authorization request") - creation_date: Optional[datetime] = Field(default=None, description="Time when the auth request was created", alias="creationDate") - client_id: Optional[StrictStr] = Field(default=None, description="OIDC client ID of the application that created the auth request", alias="clientId") - scope: Optional[List[StrictStr]] = Field(default=None, description="Requested scopes by the application, which the user must consent to.") - redirect_uri: Optional[StrictStr] = Field(default=None, description="Base URI that points back to the application", alias="redirectUri") - prompt: Optional[List[OIDCServicePrompt]] = Field(default=None, description="Prompts that must be displayed to the user") - ui_locales: Optional[List[StrictStr]] = Field(default=None, description="End-User's preferred languages and scripts for the user interface, represented as a list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value [fr-CA, fr, en] represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported.", alias="uiLocales") - 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") + id: Optional[StrictStr] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + client_id: Optional[StrictStr] = Field(default=None, alias="clientId") + scope: Optional[List[StrictStr]] = None + redirect_uri: Optional[StrictStr] = Field(default=None, alias="redirectUri") + prompt: Optional[List[OIDCServicePrompt]] = None + ui_locales: Optional[List[StrictStr]] = Field(default=None, alias="uiLocales") + login_hint: Optional[StrictStr] = Field(default=None, alias="loginHint") + max_age: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="maxAge") + hint_user_id: Optional[StrictStr] = Field(default=None, alias="hintUserId") model_config = ConfigDict( populate_by_name=True, @@ -78,6 +78,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if login_hint (nullable) is None + # and model_fields_set contains the field + if self.login_hint is None and "login_hint" in self.model_fields_set: + _dict['loginHint'] = None + + # set to None if hint_user_id (nullable) is None + # and model_fields_set contains the field + if self.hint_user_id is None and "hint_user_id" in self.model_fields_set: + _dict['hintUserId'] = None + return _dict @classmethod diff --git a/zitadel_client/models/oidc_service_authorization_error.py b/zitadel_client/models/oidc_service_authorization_error.py index 0f0d403f..8e4592c1 100644 --- a/zitadel_client/models/oidc_service_authorization_error.py +++ b/zitadel_client/models/oidc_service_authorization_error.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.oidc_service_error_reason import OIDCServiceErrorReason from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class OIDCServiceAuthorizationError(BaseModel): """ OIDCServiceAuthorizationError """ # noqa: E501 - error: Optional[OIDCServiceErrorReason] = OIDCServiceErrorReason.ERROR_REASON_UNSPECIFIED + error: Optional[OIDCServiceErrorReason] = None error_description: Optional[StrictStr] = Field(default=None, alias="errorDescription") error_uri: Optional[StrictStr] = Field(default=None, alias="errorUri") @@ -70,6 +70,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if error_description (nullable) is None + # and model_fields_set contains the field + if self.error_description is None and "error_description" in self.model_fields_set: + _dict['errorDescription'] = None + + # set to None if error_uri (nullable) is None + # and model_fields_set contains the field + if self.error_uri is None and "error_uri" in self.model_fields_set: + _dict['errorUri'] = None + return _dict @classmethod @@ -82,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "error": obj.get("error") if obj.get("error") is not None else OIDCServiceErrorReason.ERROR_REASON_UNSPECIFIED, + "error": obj.get("error"), "errorDescription": obj.get("errorDescription"), "errorUri": obj.get("errorUri") }) 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..3da03dfb 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 @@ -13,77 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.deny import Deny +from zitadel_client.models.session import Session +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.oidc_service_session import OIDCServiceSession -from typing import Optional, Set -from typing_extensions import Self +OIDCSERVICEAUTHORIZEORDENYDEVICEAUTHORIZATIONREQUEST_ONE_OF_SCHEMAS = ["Deny", "Session"] class OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest(BaseModel): """ OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest - """ # noqa: E501 - session: Optional[OIDCServiceSession] = None - deny: Optional[Dict[str, Any]] = None + """ + # data type: Deny + oneof_schema_1_validator: Optional[Deny] = None + # data type: Session + oneof_schema_2_validator: Optional[Session] = None + actual_instance: Optional[Union[Deny, Session]] = None + one_of_schemas: Set[str] = { "Deny", "Session" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: Deny + if not isinstance(v, Deny): + error_messages.append(f"Error! Input type `{type(v)}` is not `Deny`") + else: + match += 1 + # validate data type: Session + if not isinstance(v, Session): + error_messages.append(f"Error! Input type `{type(v)}` is not `Session`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest with oneOf schemas: Deny, Session. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest with oneOf schemas: Deny, Session. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Deny + try: + instance.actual_instance = Deny.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Session + try: + instance.actual_instance = Session.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest with oneOf schemas: Deny, Session. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest with oneOf schemas: Deny, Session. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Deny, Session]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _obj = cls.model_validate({ - "session": OIDCServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None, - "deny": obj.get("deny") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/oidc_service_connect_error.py b/zitadel_client/models/oidc_service_connect_error.py new file mode 100644 index 00000000..ee7cbe4a --- /dev/null +++ b/zitadel_client/models/oidc_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.oidc_service_any import OIDCServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class OIDCServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[OIDCServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OIDCServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OIDCServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": OIDCServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + 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..3cdeb8e5 100644 --- a/zitadel_client/models/oidc_service_create_callback_request.py +++ b/zitadel_client/models/oidc_service_create_callback_request.py @@ -13,78 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.error import Error +from zitadel_client.models.session import Session +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.oidc_service_authorization_error import OIDCServiceAuthorizationError -from zitadel_client.models.oidc_service_session import OIDCServiceSession -from typing import Optional, Set -from typing_extensions import Self +OIDCSERVICECREATECALLBACKREQUEST_ONE_OF_SCHEMAS = ["Error", "Session"] class OIDCServiceCreateCallbackRequest(BaseModel): """ OIDCServiceCreateCallbackRequest - """ # noqa: E501 - session: Optional[OIDCServiceSession] = None - error: Optional[OIDCServiceAuthorizationError] = None + """ + # data type: Error + oneof_schema_1_validator: Optional[Error] = None + # data type: Session + oneof_schema_2_validator: Optional[Session] = None + actual_instance: Optional[Union[Error, Session]] = None + one_of_schemas: Set[str] = { "Error", "Session" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = OIDCServiceCreateCallbackRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: Error + if not isinstance(v, Error): + error_messages.append(f"Error! Input type `{type(v)}` is not `Error`") + else: + match += 1 + # validate data type: Session + if not isinstance(v, Session): + error_messages.append(f"Error! Input type `{type(v)}` is not `Session`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in OIDCServiceCreateCallbackRequest with oneOf schemas: Error, Session. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in OIDCServiceCreateCallbackRequest with oneOf schemas: Error, Session. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OIDCServiceCreateCallbackRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OIDCServiceCreateCallbackRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Error + try: + instance.actual_instance = Error.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Session + try: + instance.actual_instance = Session.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into OIDCServiceCreateCallbackRequest with oneOf schemas: Error, Session. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into OIDCServiceCreateCallbackRequest with oneOf schemas: Error, Session. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Error, Session]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _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 - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/oidc_service_create_callback_response.py b/zitadel_client/models/oidc_service_create_callback_response.py index d5232a49..0e371b80 100644 --- a/zitadel_client/models/oidc_service_create_callback_response.py +++ b/zitadel_client/models/oidc_service_create_callback_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.oidc_service_details import OIDCServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class OIDCServiceCreateCallbackResponse(BaseModel): OIDCServiceCreateCallbackResponse """ # 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") + callback_url: Optional[StrictStr] = Field(default=None, alias="callbackUrl") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/oidc_service_details.py b/zitadel_client/models/oidc_service_details.py index c406cd44..7a0a4dea 100644 --- a/zitadel_client/models/oidc_service_details.py +++ b/zitadel_client/models/oidc_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,10 @@ class OIDCServiceDetails(BaseModel): """ OIDCServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - 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") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") model_config = ConfigDict( populate_by_name=True, @@ -71,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/oidc_service_get_auth_request_request.py b/zitadel_client/models/oidc_service_get_auth_request_request.py new file mode 100644 index 00000000..4a4bdfaf --- /dev/null +++ b/zitadel_client/models/oidc_service_get_auth_request_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OIDCServiceGetAuthRequestRequest(BaseModel): + """ + OIDCServiceGetAuthRequestRequest + """ # noqa: E501 + auth_request_id: Optional[StrictStr] = Field(default=None, alias="authRequestId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OIDCServiceGetAuthRequestRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OIDCServiceGetAuthRequestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authRequestId": obj.get("authRequestId") + }) + 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..3d058c34 100644 --- a/zitadel_client/models/oidc_service_get_auth_request_response.py +++ b/zitadel_client/models/oidc_service_get_auth_request_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.oidc_service_auth_request import OIDCServiceAuthRequest from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/oidc_service_get_device_authorization_request_request.py b/zitadel_client/models/oidc_service_get_device_authorization_request_request.py new file mode 100644 index 00000000..5c49a02c --- /dev/null +++ b/zitadel_client/models/oidc_service_get_device_authorization_request_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OIDCServiceGetDeviceAuthorizationRequestRequest(BaseModel): + """ + OIDCServiceGetDeviceAuthorizationRequestRequest + """ # noqa: E501 + user_code: Optional[StrictStr] = Field(default=None, description="The user_code returned by the device authorization request and provided to the user by the device.", alias="userCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OIDCServiceGetDeviceAuthorizationRequestRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OIDCServiceGetDeviceAuthorizationRequestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userCode": obj.get("userCode") + }) + 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..65cd8f5a 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 @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.oidc_service_device_authorization_request import OIDCServiceDeviceAuthorizationRequest from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/oidc_service_session.py b/zitadel_client/models/oidc_service_session.py index e3528758..f8885fe3 100644 --- a/zitadel_client/models/oidc_service_session.py +++ b/zitadel_client/models/oidc_service_session.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,8 @@ class OIDCServiceSession(BaseModel): """ OIDCServiceSession """ # 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") + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/or_query.py b/zitadel_client/models/or_query.py new file mode 100644 index 00000000..1c552263 --- /dev/null +++ b/zitadel_client/models/or_query.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OrQuery(BaseModel): + """ + OrQuery + """ # noqa: E501 + or_query: UserServiceOrQuery = Field(alias="orQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of or_query + if self.or_query: + _dict['orQuery'] = self.or_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orQuery": UserServiceOrQuery.from_dict(obj["orQuery"]) if obj.get("orQuery") is not None else None + }) + return _obj + +from zitadel_client.models.user_service_or_query import UserServiceOrQuery +# TODO: Rewrite to not use raise_errors +OrQuery.model_rebuild(raise_errors=False) + diff --git a/zitadel_client/models/or_query1.py b/zitadel_client/models/or_query1.py new file mode 100644 index 00000000..cf922373 --- /dev/null +++ b/zitadel_client/models/or_query1.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OrQuery1(BaseModel): + """ + OrQuery1 + """ # noqa: E501 + or_query: BetaUserServiceOrQuery = Field(alias="orQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of or_query + if self.or_query: + _dict['orQuery'] = self.or_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orQuery": BetaUserServiceOrQuery.from_dict(obj["orQuery"]) if obj.get("orQuery") is not None else None + }) + return _obj + +from zitadel_client.models.beta_user_service_or_query import BetaUserServiceOrQuery +# TODO: Rewrite to not use raise_errors +OrQuery1.model_rebuild(raise_errors=False) + diff --git a/zitadel_client/models/org_domain.py b/zitadel_client/models/org_domain.py new file mode 100644 index 00000000..41e3ba14 --- /dev/null +++ b/zitadel_client/models/org_domain.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OrgDomain(BaseModel): + """ + OrgDomain + """ # noqa: E501 + org_domain: StrictStr = Field(alias="orgDomain") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrgDomain from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrgDomain from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orgDomain": obj.get("orgDomain") + }) + return _obj + + diff --git a/zitadel_client/models/org_id.py b/zitadel_client/models/org_id.py new file mode 100644 index 00000000..2263931b --- /dev/null +++ b/zitadel_client/models/org_id.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OrgId(BaseModel): + """ + OrgId + """ # noqa: E501 + org_id: StrictStr = Field(alias="orgId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrgId from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrgId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orgId": obj.get("orgId") + }) + return _obj + + diff --git a/zitadel_client/models/organization_id_query.py b/zitadel_client/models/organization_id_query.py new file mode 100644 index 00000000..afe38b18 --- /dev/null +++ b/zitadel_client/models/organization_id_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_organization_id_query import UserServiceOrganizationIdQuery +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationIdQuery(BaseModel): + """ + OrganizationIdQuery + """ # noqa: E501 + organization_id_query: UserServiceOrganizationIdQuery = Field(alias="organizationIdQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationIdQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of organization_id_query + if self.organization_id_query: + _dict['organizationIdQuery'] = self.organization_id_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationIdQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationIdQuery": UserServiceOrganizationIdQuery.from_dict(obj["organizationIdQuery"]) if obj.get("organizationIdQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/organization_id_query1.py b/zitadel_client/models/organization_id_query1.py new file mode 100644 index 00000000..4ef2147a --- /dev/null +++ b/zitadel_client/models/organization_id_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_organization_id_query import BetaUserServiceOrganizationIdQuery +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationIdQuery1(BaseModel): + """ + OrganizationIdQuery1 + """ # noqa: E501 + organization_id_query: BetaUserServiceOrganizationIdQuery = Field(alias="organizationIdQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationIdQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of organization_id_query + if self.organization_id_query: + _dict['organizationIdQuery'] = self.organization_id_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationIdQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationIdQuery": BetaUserServiceOrganizationIdQuery.from_dict(obj["organizationIdQuery"]) if obj.get("organizationIdQuery") is not None else None + }) + 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..fb28f1eb 100644 --- a/zitadel_client/models/organization_service_add_human_user_request.py +++ b/zitadel_client/models/organization_service_add_human_user_request.py @@ -13,103 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.hashed_password1 import HashedPassword1 +from zitadel_client.models.password1 import Password1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.organization_service_hashed_password import OrganizationServiceHashedPassword -from zitadel_client.models.organization_service_idp_link import OrganizationServiceIDPLink -from zitadel_client.models.organization_service_password import OrganizationServicePassword -from zitadel_client.models.organization_service_set_human_email import OrganizationServiceSetHumanEmail -from zitadel_client.models.organization_service_set_human_phone import OrganizationServiceSetHumanPhone -from zitadel_client.models.organization_service_set_human_profile import OrganizationServiceSetHumanProfile -from zitadel_client.models.organization_service_set_metadata_entry import OrganizationServiceSetMetadataEntry -from zitadel_client.models.zitadelobjectv2_organization import Zitadelobjectv2Organization -from typing import Optional, Set -from typing_extensions import Self +ORGANIZATIONSERVICEADDHUMANUSERREQUEST_ONE_OF_SCHEMAS = ["HashedPassword1", "Password1"] class OrganizationServiceAddHumanUserRequest(BaseModel): """ OrganizationServiceAddHumanUserRequest - """ # noqa: E501 - user_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="optionally set your own id unique for the user.", alias="userId") - username: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="optionally set a unique username, if none is provided the email will be used.") - organization: Optional[Zitadelobjectv2Organization] = None - profile: OrganizationServiceSetHumanProfile - email: OrganizationServiceSetHumanEmail - phone: Optional[OrganizationServiceSetHumanPhone] = None - metadata: Optional[List[OrganizationServiceSetMetadataEntry]] = None - password: Optional[OrganizationServicePassword] = None - 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") + """ + # data type: HashedPassword1 + oneof_schema_1_validator: Optional[HashedPassword1] = None + # data type: Password1 + oneof_schema_2_validator: Optional[Password1] = None + actual_instance: Optional[Union[HashedPassword1, Password1]] = None + one_of_schemas: Set[str] = { "HashedPassword1", "Password1" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = OrganizationServiceAddHumanUserRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: HashedPassword1 + if not isinstance(v, HashedPassword1): + error_messages.append(f"Error! Input type `{type(v)}` is not `HashedPassword1`") + else: + match += 1 + # validate data type: Password1 + if not isinstance(v, Password1): + error_messages.append(f"Error! Input type `{type(v)}` is not `Password1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in OrganizationServiceAddHumanUserRequest with oneOf schemas: HashedPassword1, Password1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in OrganizationServiceAddHumanUserRequest with oneOf schemas: HashedPassword1, Password1. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationServiceAddHumanUserRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationServiceAddHumanUserRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into HashedPassword1 + try: + instance.actual_instance = HashedPassword1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Password1 + try: + instance.actual_instance = Password1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into OrganizationServiceAddHumanUserRequest with oneOf schemas: HashedPassword1, Password1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into OrganizationServiceAddHumanUserRequest with oneOf schemas: HashedPassword1, Password1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], HashedPassword1, Password1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - 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") - }) - return _obj + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/organization_service_add_organization_request.py b/zitadel_client/models/organization_service_add_organization_request.py index b96f5ee9..33ce2338 100644 --- a/zitadel_client/models/organization_service_add_organization_request.py +++ b/zitadel_client/models/organization_service_add_organization_request.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.organization_service_add_organization_request_admin import OrganizationServiceAddOrganizationRequestAdmin +from zitadel_client.models.organization_service_admin import OrganizationServiceAdmin from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,8 @@ class OrganizationServiceAddOrganizationRequest(BaseModel): """ OrganizationServiceAddOrganizationRequest """ # noqa: E501 - name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] - admins: Optional[List[OrganizationServiceAddOrganizationRequestAdmin]] = None + name: StrictStr + admins: Optional[List[OrganizationServiceAdmin]] = None model_config = ConfigDict( populate_by_name=True, @@ -90,7 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), - "admins": [OrganizationServiceAddOrganizationRequestAdmin.from_dict(_item) for _item in obj["admins"]] if obj.get("admins") is not None else None + "admins": [OrganizationServiceAdmin.from_dict(_item) for _item in obj["admins"]] if obj.get("admins") is not None else None }) 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..46fd6887 100644 --- a/zitadel_client/models/organization_service_add_organization_response.py +++ b/zitadel_client/models/organization_service_add_organization_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.organization_service_add_organization_response_created_admin import OrganizationServiceAddOrganizationResponseCreatedAdmin +from zitadel_client.models.organization_service_created_admin import OrganizationServiceCreatedAdmin from zitadel_client.models.organization_service_details import OrganizationServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class OrganizationServiceAddOrganizationResponse(BaseModel): """ # noqa: E501 details: Optional[OrganizationServiceDetails] = None organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") - created_admins: Optional[List[OrganizationServiceAddOrganizationResponseCreatedAdmin]] = Field(default=None, alias="createdAdmins") + created_admins: Optional[List[OrganizationServiceCreatedAdmin]] = Field(default=None, alias="createdAdmins") model_config = ConfigDict( populate_by_name=True, @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": OrganizationServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "organizationId": obj.get("organizationId"), - "createdAdmins": [OrganizationServiceAddOrganizationResponseCreatedAdmin.from_dict(_item) for _item in obj["createdAdmins"]] if obj.get("createdAdmins") is not None else None + "createdAdmins": [OrganizationServiceCreatedAdmin.from_dict(_item) for _item in obj["createdAdmins"]] if obj.get("createdAdmins") is not None else None }) return _obj diff --git a/zitadel_client/models/organization_service_admin.py b/zitadel_client/models/organization_service_admin.py new file mode 100644 index 00000000..ac726af7 --- /dev/null +++ b/zitadel_client/models/organization_service_admin.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.human1 import Human1 +from zitadel_client.models.user_id import UserId +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ORGANIZATIONSERVICEADMIN_ONE_OF_SCHEMAS = ["Human1", "UserId"] + +class OrganizationServiceAdmin(BaseModel): + """ + OrganizationServiceAdmin + """ + # data type: Human1 + oneof_schema_1_validator: Optional[Human1] = None + # data type: UserId + oneof_schema_2_validator: Optional[UserId] = None + actual_instance: Optional[Union[Human1, UserId]] = None + one_of_schemas: Set[str] = { "Human1", "UserId" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = OrganizationServiceAdmin.model_construct() + error_messages = [] + match = 0 + # validate data type: Human1 + if not isinstance(v, Human1): + error_messages.append(f"Error! Input type `{type(v)}` is not `Human1`") + else: + match += 1 + # validate data type: UserId + if not isinstance(v, UserId): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserId`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in OrganizationServiceAdmin with oneOf schemas: Human1, UserId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in OrganizationServiceAdmin with oneOf schemas: Human1, UserId. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Human1 + try: + instance.actual_instance = Human1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserId + try: + instance.actual_instance = UserId.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into OrganizationServiceAdmin with oneOf schemas: Human1, UserId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into OrganizationServiceAdmin with oneOf schemas: Human1, UserId. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Human1, UserId]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/organization_service_any.py b/zitadel_client/models/organization_service_any.py new file mode 100644 index 00000000..931b8533 --- /dev/null +++ b/zitadel_client/models/organization_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/organization_service_connect_error.py b/zitadel_client/models/organization_service_connect_error.py new file mode 100644 index 00000000..eae025b0 --- /dev/null +++ b/zitadel_client/models/organization_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.organization_service_any import OrganizationServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[OrganizationServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": OrganizationServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/organization_service_created_admin.py b/zitadel_client/models/organization_service_created_admin.py new file mode 100644 index 00000000..6a1e243a --- /dev/null +++ b/zitadel_client/models/organization_service_created_admin.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationServiceCreatedAdmin(BaseModel): + """ + OrganizationServiceCreatedAdmin + """ # noqa: E501 + 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") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationServiceCreatedAdmin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationServiceCreatedAdmin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "emailCode": obj.get("emailCode"), + "phoneCode": obj.get("phoneCode") + }) + return _obj + + diff --git a/zitadel_client/models/organization_service_details.py b/zitadel_client/models/organization_service_details.py index a366bb3d..148219b7 100644 --- a/zitadel_client/models/organization_service_details.py +++ b/zitadel_client/models/organization_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,10 @@ class OrganizationServiceDetails(BaseModel): """ OrganizationServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - 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") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") model_config = ConfigDict( populate_by_name=True, @@ -71,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/organization_service_hashed_password.py b/zitadel_client/models/organization_service_hashed_password.py index 65147fef..bfabcfda 100644 --- a/zitadel_client/models/organization_service_hashed_password.py +++ b/zitadel_client/models/organization_service_hashed_password.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ class OrganizationServiceHashedPassword(BaseModel): """ OrganizationServiceHashedPassword """ # 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\"") + hash: StrictStr change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") model_config = ConfigDict( diff --git a/zitadel_client/models/organization_service_idp_link.py b/zitadel_client/models/organization_service_idp_link.py index f92913d7..34245641 100644 --- a/zitadel_client/models/organization_service_idp_link.py +++ b/zitadel_client/models/organization_service_idp_link.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +26,9 @@ class OrganizationServiceIDPLink(BaseModel): """ OrganizationServiceIDPLink """ # noqa: E501 - 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") + idp_id: Optional[StrictStr] = Field(default=None, alias="idpId") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + user_name: Optional[StrictStr] = Field(default=None, alias="userName") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/organization_service_list_details.py b/zitadel_client/models/organization_service_list_details.py index 435b19cb..fb258f98 100644 --- a/zitadel_client/models/organization_service_list_details.py +++ b/zitadel_client/models/organization_service_list_details.py @@ -18,8 +18,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,9 @@ class OrganizationServiceListDetails(BaseModel): """ OrganizationServiceListDetails """ # noqa: E501 - 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") + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") model_config = ConfigDict( populate_by_name=True, @@ -70,6 +70,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/organization_service_list_organizations_request.py b/zitadel_client/models/organization_service_list_organizations_request.py index 599762aa..c16ed2eb 100644 --- a/zitadel_client/models/organization_service_list_organizations_request.py +++ b/zitadel_client/models/organization_service_list_organizations_request.py @@ -30,8 +30,8 @@ class OrganizationServiceListOrganizationsRequest(BaseModel): OrganizationServiceListOrganizationsRequest """ # noqa: E501 query: Optional[OrganizationServiceListQuery] = None - sorting_column: Optional[OrganizationServiceOrganizationFieldName] = Field(default=OrganizationServiceOrganizationFieldName.ORGANIZATION_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") - queries: Optional[List[OrganizationServiceSearchQuery]] = None + sorting_column: Optional[OrganizationServiceOrganizationFieldName] = Field(default=None, alias="sortingColumn") + queries: Optional[List[OrganizationServiceSearchQuery]] = Field(default=None, description="criteria the client is looking for") model_config = ConfigDict( populate_by_name=True, @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "query": OrganizationServiceListQuery.from_dict(obj["query"]) if obj.get("query") is not None else None, - "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else OrganizationServiceOrganizationFieldName.ORGANIZATION_FIELD_NAME_UNSPECIFIED, + "sortingColumn": obj.get("sortingColumn"), "queries": [OrganizationServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None }) 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..9dc157a0 100644 --- a/zitadel_client/models/organization_service_list_organizations_response.py +++ b/zitadel_client/models/organization_service_list_organizations_response.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from zitadel_client.models.organization_service_list_details import OrganizationServiceListDetails +from zitadel_client.models.organization_service_organization import OrganizationServiceOrganization from zitadel_client.models.organization_service_organization_field_name import OrganizationServiceOrganizationFieldName -from zitadel_client.models.zitadelorgv2_organization import Zitadelorgv2Organization from typing import Optional, Set from typing_extensions import Self @@ -30,8 +30,8 @@ class OrganizationServiceListOrganizationsResponse(BaseModel): OrganizationServiceListOrganizationsResponse """ # noqa: E501 details: Optional[OrganizationServiceListDetails] = None - sorting_column: Optional[OrganizationServiceOrganizationFieldName] = Field(default=OrganizationServiceOrganizationFieldName.ORGANIZATION_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") - result: Optional[List[Zitadelorgv2Organization]] = None + sorting_column: Optional[OrganizationServiceOrganizationFieldName] = Field(default=None, alias="sortingColumn") + result: Optional[List[OrganizationServiceOrganization]] = None model_config = ConfigDict( populate_by_name=True, @@ -95,8 +95,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": OrganizationServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, - "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 + "sortingColumn": obj.get("sortingColumn"), + "result": [OrganizationServiceOrganization.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None }) return _obj diff --git a/zitadel_client/models/organization_service_list_query.py b/zitadel_client/models/organization_service_list_query.py index a738106a..b7b8b53e 100644 --- a/zitadel_client/models/organization_service_list_query.py +++ b/zitadel_client/models/organization_service_list_query.py @@ -17,18 +17,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self class OrganizationServiceListQuery(BaseModel): """ - Object unspecific list filters like offset, limit and asc/desc. + OrganizationServiceListQuery """ # noqa: E501 - 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") + offset: Optional[Any] = None + limit: Optional[StrictInt] = None + asc: Optional[StrictBool] = None model_config = ConfigDict( populate_by_name=True, @@ -69,6 +69,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + return _dict @classmethod diff --git a/zitadel_client/models/zitadelorgv2_organization.py b/zitadel_client/models/organization_service_organization.py similarity index 85% rename from zitadel_client/models/zitadelorgv2_organization.py rename to zitadel_client/models/organization_service_organization.py index 3657dd26..16045c43 100644 --- a/zitadel_client/models/zitadelorgv2_organization.py +++ b/zitadel_client/models/organization_service_organization.py @@ -18,19 +18,19 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.organization_service_details import OrganizationServiceDetails from zitadel_client.models.organization_service_organization_state import OrganizationServiceOrganizationState from typing import Optional, Set from typing_extensions import Self -class Zitadelorgv2Organization(BaseModel): +class OrganizationServiceOrganization(BaseModel): """ - Zitadelorgv2Organization + OrganizationServiceOrganization """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the organization.") details: Optional[OrganizationServiceDetails] = None - state: Optional[OrganizationServiceOrganizationState] = OrganizationServiceOrganizationState.ORGANIZATION_STATE_UNSPECIFIED + state: Optional[OrganizationServiceOrganizationState] = None 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") @@ -52,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Zitadelorgv2Organization from a JSON string""" + """Create an instance of OrganizationServiceOrganization from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -80,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Zitadelorgv2Organization from a dict""" + """Create an instance of OrganizationServiceOrganization from a dict""" if obj is None: return None @@ -90,7 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "details": OrganizationServiceDetails.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 OrganizationServiceOrganizationState.ORGANIZATION_STATE_UNSPECIFIED, + "state": obj.get("state"), "name": obj.get("name"), "primaryDomain": obj.get("primaryDomain") }) diff --git a/zitadel_client/models/organization_service_organization_domain_query.py b/zitadel_client/models/organization_service_organization_domain_query.py index e3f96739..4d63a83e 100644 --- a/zitadel_client/models/organization_service_organization_domain_query.py +++ b/zitadel_client/models/organization_service_organization_domain_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.organization_service_text_query_method import OrganizationServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,8 @@ class OrganizationServiceOrganizationDomainQuery(BaseModel): """ OrganizationServiceOrganizationDomainQuery """ # 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 + domain: StrictStr = Field(description="Domain used in organization, not necessary primary domain.") + method: Optional[OrganizationServiceTextQueryMethod] = None model_config = ConfigDict( populate_by_name=True, @@ -83,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "domain": obj.get("domain"), - "method": obj.get("method") if obj.get("method") is not None else OrganizationServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) 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..92f965ef 100644 --- a/zitadel_client/models/organization_service_organization_id_query.py +++ b/zitadel_client/models/organization_service_organization_id_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ 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.") + id: StrictStr = Field(description="Unique identifier of the organization.") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/organization_service_organization_name_query.py b/zitadel_client/models/organization_service_organization_name_query.py index 36da656d..6d5bad7a 100644 --- a/zitadel_client/models/organization_service_organization_name_query.py +++ b/zitadel_client/models/organization_service_organization_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.organization_service_text_query_method import OrganizationServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,8 @@ class OrganizationServiceOrganizationNameQuery(BaseModel): """ OrganizationServiceOrganizationNameQuery """ # 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 + name: StrictStr = Field(description="Name of the organization.") + method: Optional[OrganizationServiceTextQueryMethod] = None model_config = ConfigDict( populate_by_name=True, @@ -83,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), - "method": obj.get("method") if obj.get("method") is not None else OrganizationServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) 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..67a4401a 100644 --- a/zitadel_client/models/organization_service_organization_state_query.py +++ b/zitadel_client/models/organization_service_organization_state_query.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.organization_service_organization_state import OrganizationServiceOrganizationState from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class OrganizationServiceOrganizationStateQuery(BaseModel): """ OrganizationServiceOrganizationStateQuery """ # noqa: E501 - state: Optional[OrganizationServiceOrganizationState] = OrganizationServiceOrganizationState.ORGANIZATION_STATE_UNSPECIFIED + state: Optional[OrganizationServiceOrganizationState] = None model_config = ConfigDict( populate_by_name=True, @@ -80,7 +80,7 @@ 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 OrganizationServiceOrganizationState.ORGANIZATION_STATE_UNSPECIFIED + "state": obj.get("state") }) return _obj diff --git a/zitadel_client/models/organization_service_password.py b/zitadel_client/models/organization_service_password.py index 52595261..38b4db93 100644 --- a/zitadel_client/models/organization_service_password.py +++ b/zitadel_client/models/organization_service_password.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ class OrganizationServicePassword(BaseModel): """ OrganizationServicePassword """ # noqa: E501 - password: Annotated[str, Field(min_length=1, strict=True, max_length=200)] + password: StrictStr change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") model_config = ConfigDict( diff --git a/zitadel_client/models/organization_service_search_query.py b/zitadel_client/models/organization_service_search_query.py index 8543bf7d..3aae19c3 100644 --- a/zitadel_client/models/organization_service_search_query.py +++ b/zitadel_client/models/organization_service_search_query.py @@ -13,86 +13,167 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.organization_service_organization_domain_query import OrganizationServiceOrganizationDomainQuery -from zitadel_client.models.organization_service_organization_id_query import OrganizationServiceOrganizationIDQuery -from zitadel_client.models.organization_service_organization_name_query import OrganizationServiceOrganizationNameQuery -from zitadel_client.models.organization_service_organization_state_query import OrganizationServiceOrganizationStateQuery -from typing import Optional, Set -from typing_extensions import Self +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.default_query import DefaultQuery +from zitadel_client.models.domain_query import DomainQuery +from zitadel_client.models.id_query import IdQuery +from zitadel_client.models.name_query import NameQuery +from zitadel_client.models.state_query1 import StateQuery1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ORGANIZATIONSERVICESEARCHQUERY_ONE_OF_SCHEMAS = ["DefaultQuery", "DomainQuery", "IdQuery", "NameQuery", "StateQuery1"] class OrganizationServiceSearchQuery(BaseModel): """ OrganizationServiceSearchQuery - """ # noqa: E501 - name_query: Optional[OrganizationServiceOrganizationNameQuery] = Field(default=None, alias="nameQuery") - domain_query: Optional[OrganizationServiceOrganizationDomainQuery] = Field(default=None, alias="domainQuery") - 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") + """ + # data type: DefaultQuery + oneof_schema_1_validator: Optional[DefaultQuery] = None + # data type: DomainQuery + oneof_schema_2_validator: Optional[DomainQuery] = None + # data type: IdQuery + oneof_schema_3_validator: Optional[IdQuery] = None + # data type: NameQuery + oneof_schema_4_validator: Optional[NameQuery] = None + # data type: StateQuery1 + oneof_schema_5_validator: Optional[StateQuery1] = None + actual_instance: Optional[Union[DefaultQuery, DomainQuery, IdQuery, NameQuery, StateQuery1]] = None + one_of_schemas: Set[str] = { "DefaultQuery", "DomainQuery", "IdQuery", "NameQuery", "StateQuery1" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = OrganizationServiceSearchQuery.model_construct() + error_messages = [] + match = 0 + # validate data type: DefaultQuery + if not isinstance(v, DefaultQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `DefaultQuery`") + else: + match += 1 + # validate data type: DomainQuery + if not isinstance(v, DomainQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `DomainQuery`") + else: + match += 1 + # validate data type: IdQuery + if not isinstance(v, IdQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `IdQuery`") + else: + match += 1 + # validate data type: NameQuery + if not isinstance(v, NameQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `NameQuery`") + else: + match += 1 + # validate data type: StateQuery1 + if not isinstance(v, StateQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `StateQuery1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in OrganizationServiceSearchQuery with oneOf schemas: DefaultQuery, DomainQuery, IdQuery, NameQuery, StateQuery1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in OrganizationServiceSearchQuery with oneOf schemas: DefaultQuery, DomainQuery, IdQuery, NameQuery, StateQuery1. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationServiceSearchQuery from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationServiceSearchQuery from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into DefaultQuery + try: + instance.actual_instance = DefaultQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DomainQuery + try: + instance.actual_instance = DomainQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into IdQuery + try: + instance.actual_instance = IdQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into NameQuery + try: + instance.actual_instance = NameQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into StateQuery1 + try: + instance.actual_instance = StateQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into OrganizationServiceSearchQuery with oneOf schemas: DefaultQuery, DomainQuery, IdQuery, NameQuery, StateQuery1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into OrganizationServiceSearchQuery with oneOf schemas: DefaultQuery, DomainQuery, IdQuery, NameQuery, StateQuery1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], DefaultQuery, DomainQuery, IdQuery, NameQuery, StateQuery1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - 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") - }) - return _obj + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) 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..f119ed2b 100644 --- a/zitadel_client/models/organization_service_send_email_verification_code.py +++ b/zitadel_client/models/organization_service_send_email_verification_code.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ 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") + url_template: Optional[StrictStr] = 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") model_config = ConfigDict( populate_by_name=True, @@ -68,6 +67,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + return _dict @classmethod diff --git a/zitadel_client/models/organization_service_set_human_email.py b/zitadel_client/models/organization_service_set_human_email.py index eb545722..05198e9d 100644 --- a/zitadel_client/models/organization_service_set_human_email.py +++ b/zitadel_client/models/organization_service_set_human_email.py @@ -13,82 +13,139 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.is_verified import IsVerified +from zitadel_client.models.return_code7 import ReturnCode7 +from zitadel_client.models.send_code5 import SendCode5 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.organization_service_send_email_verification_code import OrganizationServiceSendEmailVerificationCode -from typing import Optional, Set -from typing_extensions import Self +ORGANIZATIONSERVICESETHUMANEMAIL_ONE_OF_SCHEMAS = ["IsVerified", "ReturnCode7", "SendCode5"] class OrganizationServiceSetHumanEmail(BaseModel): """ OrganizationServiceSetHumanEmail - """ # noqa: E501 - email: Annotated[str, Field(min_length=1, strict=True, max_length=200)] - 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") + """ + # data type: IsVerified + oneof_schema_1_validator: Optional[IsVerified] = None + # data type: ReturnCode7 + oneof_schema_2_validator: Optional[ReturnCode7] = None + # data type: SendCode5 + oneof_schema_3_validator: Optional[SendCode5] = None + actual_instance: Optional[Union[IsVerified, ReturnCode7, SendCode5]] = None + one_of_schemas: Set[str] = { "IsVerified", "ReturnCode7", "SendCode5" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = OrganizationServiceSetHumanEmail.model_construct() + error_messages = [] + match = 0 + # validate data type: IsVerified + if not isinstance(v, IsVerified): + error_messages.append(f"Error! Input type `{type(v)}` is not `IsVerified`") + else: + match += 1 + # validate data type: ReturnCode7 + if not isinstance(v, ReturnCode7): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode7`") + else: + match += 1 + # validate data type: SendCode5 + if not isinstance(v, SendCode5): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode5`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in OrganizationServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode7, SendCode5. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in OrganizationServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode7, SendCode5. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationServiceSetHumanEmail from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationServiceSetHumanEmail from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IsVerified + try: + instance.actual_instance = IsVerified.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ReturnCode7 + try: + instance.actual_instance = ReturnCode7.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode5 + try: + instance.actual_instance = SendCode5.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into OrganizationServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode7, SendCode5. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into OrganizationServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode7, SendCode5. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IsVerified, ReturnCode7, SendCode5]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _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") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/organization_service_set_human_phone.py b/zitadel_client/models/organization_service_set_human_phone.py index ef962e08..107cb815 100644 --- a/zitadel_client/models/organization_service_set_human_phone.py +++ b/zitadel_client/models/organization_service_set_human_phone.py @@ -13,81 +13,139 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.is_verified import IsVerified +from zitadel_client.models.return_code8 import ReturnCode8 +from zitadel_client.models.send_code6 import SendCode6 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self +ORGANIZATIONSERVICESETHUMANPHONE_ONE_OF_SCHEMAS = ["IsVerified", "ReturnCode8", "SendCode6"] class OrganizationServiceSetHumanPhone(BaseModel): """ OrganizationServiceSetHumanPhone - """ # noqa: E501 - phone: Optional[Annotated[str, Field(strict=True, max_length=200)]] = None - 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") + """ + # data type: IsVerified + oneof_schema_1_validator: Optional[IsVerified] = None + # data type: ReturnCode8 + oneof_schema_2_validator: Optional[ReturnCode8] = None + # data type: SendCode6 + oneof_schema_3_validator: Optional[SendCode6] = None + actual_instance: Optional[Union[IsVerified, ReturnCode8, SendCode6]] = None + one_of_schemas: Set[str] = { "IsVerified", "ReturnCode8", "SendCode6" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = OrganizationServiceSetHumanPhone.model_construct() + error_messages = [] + match = 0 + # validate data type: IsVerified + if not isinstance(v, IsVerified): + error_messages.append(f"Error! Input type `{type(v)}` is not `IsVerified`") + else: + match += 1 + # validate data type: ReturnCode8 + if not isinstance(v, ReturnCode8): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode8`") + else: + match += 1 + # validate data type: SendCode6 + if not isinstance(v, SendCode6): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode6`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in OrganizationServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode8, SendCode6. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in OrganizationServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode8, SendCode6. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationServiceSetHumanPhone from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationServiceSetHumanPhone from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IsVerified + try: + instance.actual_instance = IsVerified.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ReturnCode8 + try: + instance.actual_instance = ReturnCode8.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode6 + try: + instance.actual_instance = SendCode6.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into OrganizationServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode8, SendCode6. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into OrganizationServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode8, SendCode6. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IsVerified, ReturnCode8, SendCode6]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _obj = cls.model_validate({ - "phone": obj.get("phone"), - "sendCode": obj.get("sendCode"), - "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/organization_service_set_human_profile.py b/zitadel_client/models/organization_service_set_human_profile.py index 828614f7..4eeafa6c 100644 --- a/zitadel_client/models/organization_service_set_human_profile.py +++ b/zitadel_client/models/organization_service_set_human_profile.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.organization_service_gender import OrganizationServiceGender from typing import Optional, Set from typing_extensions import Self @@ -28,12 +27,12 @@ class OrganizationServiceSetHumanProfile(BaseModel): """ OrganizationServiceSetHumanProfile """ # noqa: E501 - given_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="givenName") - family_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="familyName") - nick_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, alias="nickName") - 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 + given_name: StrictStr = Field(alias="givenName") + family_name: StrictStr = Field(alias="familyName") + nick_name: Optional[StrictStr] = Field(default=None, alias="nickName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + preferred_language: Optional[StrictStr] = Field(default=None, alias="preferredLanguage") + gender: Optional[OrganizationServiceGender] = None model_config = ConfigDict( populate_by_name=True, @@ -74,6 +73,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict['nickName'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if preferred_language (nullable) is None + # and model_fields_set contains the field + if self.preferred_language is None and "preferred_language" in self.model_fields_set: + _dict['preferredLanguage'] = None + return _dict @classmethod @@ -91,7 +105,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "nickName": obj.get("nickName"), "displayName": obj.get("displayName"), "preferredLanguage": obj.get("preferredLanguage"), - "gender": obj.get("gender") if obj.get("gender") is not None else OrganizationServiceGender.GENDER_UNSPECIFIED + "gender": obj.get("gender") }) 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..d6be0955 100644 --- a/zitadel_client/models/organization_service_set_metadata_entry.py +++ b/zitadel_client/models/organization_service_set_metadata_entry.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Union -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Union from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,8 @@ class OrganizationServiceSetMetadataEntry(BaseModel): """ OrganizationServiceSetMetadataEntry """ # 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.") + key: StrictStr + value: Union[StrictBytes, StrictStr] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/otp.py b/zitadel_client/models/otp.py new file mode 100644 index 00000000..c0e15a4b --- /dev/null +++ b/zitadel_client/models/otp.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Otp(BaseModel): + """ + Otp + """ # noqa: E501 + otp: Dict[str, Any] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Otp from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Otp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "otp": obj.get("otp") + }) + return _obj + + diff --git a/zitadel_client/models/otp_email.py b/zitadel_client/models/otp_email.py new file mode 100644 index 00000000..8f8e0cf8 --- /dev/null +++ b/zitadel_client/models/otp_email.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OtpEmail(BaseModel): + """ + OtpEmail + """ # noqa: E501 + otp_email: Dict[str, Any] = Field(alias="otpEmail") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OtpEmail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OtpEmail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "otpEmail": obj.get("otpEmail") + }) + return _obj + + diff --git a/zitadel_client/models/otp_sms.py b/zitadel_client/models/otp_sms.py new file mode 100644 index 00000000..526edfa6 --- /dev/null +++ b/zitadel_client/models/otp_sms.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OtpSms(BaseModel): + """ + OtpSms + """ # noqa: E501 + otp_sms: Dict[str, Any] = Field(alias="otpSms") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OtpSms from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OtpSms from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "otpSms": obj.get("otpSms") + }) + return _obj + + diff --git a/zitadel_client/models/password.py b/zitadel_client/models/password.py new file mode 100644 index 00000000..80bdd349 --- /dev/null +++ b/zitadel_client/models/password.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_password import UserServicePassword +from typing import Optional, Set +from typing_extensions import Self + +class Password(BaseModel): + """ + Password + """ # noqa: E501 + password: UserServicePassword + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Password from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Password from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": UserServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/password1.py b/zitadel_client/models/password1.py new file mode 100644 index 00000000..dcfdd950 --- /dev/null +++ b/zitadel_client/models/password1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.organization_service_password import OrganizationServicePassword +from typing import Optional, Set +from typing_extensions import Self + +class Password1(BaseModel): + """ + Password1 + """ # noqa: E501 + password: OrganizationServicePassword + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Password1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Password1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": OrganizationServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/password2.py b/zitadel_client/models/password2.py new file mode 100644 index 00000000..3ea603e9 --- /dev/null +++ b/zitadel_client/models/password2.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_password import BetaUserServicePassword +from typing import Optional, Set +from typing_extensions import Self + +class Password2(BaseModel): + """ + Password2 + """ # noqa: E501 + password: BetaUserServicePassword + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Password2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Password2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": BetaUserServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/password3.py b/zitadel_client/models/password3.py new file mode 100644 index 00000000..c9b318cc --- /dev/null +++ b/zitadel_client/models/password3.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_organization_service_password import BetaOrganizationServicePassword +from typing import Optional, Set +from typing_extensions import Self + +class Password3(BaseModel): + """ + Password3 + """ # noqa: E501 + password: BetaOrganizationServicePassword + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Password3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Password3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": BetaOrganizationServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/phone_query.py b/zitadel_client/models/phone_query.py new file mode 100644 index 00000000..36f794a3 --- /dev/null +++ b/zitadel_client/models/phone_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_phone_query import UserServicePhoneQuery +from typing import Optional, Set +from typing_extensions import Self + +class PhoneQuery(BaseModel): + """ + PhoneQuery + """ # noqa: E501 + phone_query: UserServicePhoneQuery = Field(alias="phoneQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PhoneQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of phone_query + if self.phone_query: + _dict['phoneQuery'] = self.phone_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PhoneQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "phoneQuery": UserServicePhoneQuery.from_dict(obj["phoneQuery"]) if obj.get("phoneQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/phone_query1.py b/zitadel_client/models/phone_query1.py new file mode 100644 index 00000000..2e9b3d5f --- /dev/null +++ b/zitadel_client/models/phone_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_phone_query import BetaUserServicePhoneQuery +from typing import Optional, Set +from typing_extensions import Self + +class PhoneQuery1(BaseModel): + """ + PhoneQuery1 + """ # noqa: E501 + phone_query: BetaUserServicePhoneQuery = Field(alias="phoneQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PhoneQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of phone_query + if self.phone_query: + _dict['phoneQuery'] = self.phone_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PhoneQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "phoneQuery": BetaUserServicePhoneQuery.from_dict(obj["phoneQuery"]) if obj.get("phoneQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/post.py b/zitadel_client/models/post.py new file mode 100644 index 00000000..11267fb1 --- /dev/null +++ b/zitadel_client/models/post.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.saml_service_post_response import SAMLServicePostResponse +from typing import Optional, Set +from typing_extensions import Self + +class Post(BaseModel): + """ + Post + """ # noqa: E501 + post: SAMLServicePostResponse + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Post from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of post + if self.post: + _dict['post'] = self.post.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Post from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "post": SAMLServicePostResponse.from_dict(obj["post"]) if obj.get("post") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/post_form.py b/zitadel_client/models/post_form.py new file mode 100644 index 00000000..5430a090 --- /dev/null +++ b/zitadel_client/models/post_form.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PostForm(BaseModel): + """ + PostForm + """ # noqa: E501 + post_form: Union[StrictBytes, StrictStr] = Field(alias="postForm") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostForm from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostForm from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "postForm": obj.get("postForm") + }) + return _obj + + diff --git a/zitadel_client/models/redirect.py b/zitadel_client/models/redirect.py new file mode 100644 index 00000000..88ca881e --- /dev/null +++ b/zitadel_client/models/redirect.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Redirect(BaseModel): + """ + Redirect + """ # noqa: E501 + redirect: Dict[str, Any] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Redirect from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Redirect from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "redirect": obj.get("redirect") + }) + return _obj + + diff --git a/zitadel_client/models/request.py b/zitadel_client/models/request.py new file mode 100644 index 00000000..113bc19b --- /dev/null +++ b/zitadel_client/models/request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_action_service_request_execution import BetaActionServiceRequestExecution +from typing import Optional, Set +from typing_extensions import Self + +class Request(BaseModel): + """ + Request + """ # noqa: E501 + request: BetaActionServiceRequestExecution + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Request from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of request + if self.request: + _dict['request'] = self.request.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Request from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "request": BetaActionServiceRequestExecution.from_dict(obj["request"]) if obj.get("request") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/response.py b/zitadel_client/models/response.py new file mode 100644 index 00000000..e59b48b6 --- /dev/null +++ b/zitadel_client/models/response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_action_service_response_execution import BetaActionServiceResponseExecution +from typing import Optional, Set +from typing_extensions import Self + +class Response(BaseModel): + """ + Response + """ # noqa: E501 + response: BetaActionServiceResponseExecution + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "response": BetaActionServiceResponseExecution.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/rest_async.py b/zitadel_client/models/rest_async.py new file mode 100644 index 00000000..48cf53dd --- /dev/null +++ b/zitadel_client/models/rest_async.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class RestAsync(BaseModel): + """ + RestAsync + """ # noqa: E501 + rest_async: Dict[str, Any] = Field(alias="restAsync") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RestAsync from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RestAsync from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "restAsync": obj.get("restAsync") + }) + return _obj + + diff --git a/zitadel_client/models/rest_call.py b/zitadel_client/models/rest_call.py new file mode 100644 index 00000000..401f4ca2 --- /dev/null +++ b/zitadel_client/models/rest_call.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_action_service_rest_call import BetaActionServiceRESTCall +from typing import Optional, Set +from typing_extensions import Self + +class RestCall(BaseModel): + """ + RestCall + """ # noqa: E501 + rest_call: BetaActionServiceRESTCall = Field(alias="restCall") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RestCall from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of rest_call + if self.rest_call: + _dict['restCall'] = self.rest_call.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RestCall from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "restCall": BetaActionServiceRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/rest_webhook.py b/zitadel_client/models/rest_webhook.py new file mode 100644 index 00000000..9243de23 --- /dev/null +++ b/zitadel_client/models/rest_webhook.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_action_service_rest_webhook import BetaActionServiceRESTWebhook +from typing import Optional, Set +from typing_extensions import Self + +class RestWebhook(BaseModel): + """ + RestWebhook + """ # noqa: E501 + rest_webhook: BetaActionServiceRESTWebhook = Field(alias="restWebhook") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RestWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of rest_webhook + if self.rest_webhook: + _dict['restWebhook'] = self.rest_webhook.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RestWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "restWebhook": BetaActionServiceRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/return_code.py b/zitadel_client/models/return_code.py new file mode 100644 index 00000000..90787d58 --- /dev/null +++ b/zitadel_client/models/return_code.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode(BaseModel): + """ + ReturnCode + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code1.py b/zitadel_client/models/return_code1.py new file mode 100644 index 00000000..cf51e3f3 --- /dev/null +++ b/zitadel_client/models/return_code1.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode1(BaseModel): + """ + ReturnCode1 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code10.py b/zitadel_client/models/return_code10.py new file mode 100644 index 00000000..223606ae --- /dev/null +++ b/zitadel_client/models/return_code10.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode10(BaseModel): + """ + ReturnCode10 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode10 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode10 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code11.py b/zitadel_client/models/return_code11.py new file mode 100644 index 00000000..33426fab --- /dev/null +++ b/zitadel_client/models/return_code11.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode11(BaseModel): + """ + ReturnCode11 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode11 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode11 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code12.py b/zitadel_client/models/return_code12.py new file mode 100644 index 00000000..c43829eb --- /dev/null +++ b/zitadel_client/models/return_code12.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode12(BaseModel): + """ + ReturnCode12 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode12 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode12 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code13.py b/zitadel_client/models/return_code13.py new file mode 100644 index 00000000..5d988f7f --- /dev/null +++ b/zitadel_client/models/return_code13.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode13(BaseModel): + """ + ReturnCode13 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode13 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode13 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code14.py b/zitadel_client/models/return_code14.py new file mode 100644 index 00000000..cdb8c503 --- /dev/null +++ b/zitadel_client/models/return_code14.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode14(BaseModel): + """ + ReturnCode14 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode14 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode14 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code2.py b/zitadel_client/models/return_code2.py new file mode 100644 index 00000000..abab30aa --- /dev/null +++ b/zitadel_client/models/return_code2.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode2(BaseModel): + """ + ReturnCode2 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code3.py b/zitadel_client/models/return_code3.py new file mode 100644 index 00000000..11dec1dd --- /dev/null +++ b/zitadel_client/models/return_code3.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode3(BaseModel): + """ + ReturnCode3 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code4.py b/zitadel_client/models/return_code4.py new file mode 100644 index 00000000..93622180 --- /dev/null +++ b/zitadel_client/models/return_code4.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode4(BaseModel): + """ + ReturnCode4 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode4 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode4 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code5.py b/zitadel_client/models/return_code5.py new file mode 100644 index 00000000..e65a40ae --- /dev/null +++ b/zitadel_client/models/return_code5.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode5(BaseModel): + """ + ReturnCode5 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode5 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode5 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code6.py b/zitadel_client/models/return_code6.py new file mode 100644 index 00000000..32081135 --- /dev/null +++ b/zitadel_client/models/return_code6.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode6(BaseModel): + """ + ReturnCode6 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode6 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode6 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code7.py b/zitadel_client/models/return_code7.py new file mode 100644 index 00000000..6f5512ee --- /dev/null +++ b/zitadel_client/models/return_code7.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode7(BaseModel): + """ + ReturnCode7 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode7 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode7 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code8.py b/zitadel_client/models/return_code8.py new file mode 100644 index 00000000..b67226fb --- /dev/null +++ b/zitadel_client/models/return_code8.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode8(BaseModel): + """ + ReturnCode8 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode8 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode8 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/return_code9.py b/zitadel_client/models/return_code9.py new file mode 100644 index 00000000..2ad52a20 --- /dev/null +++ b/zitadel_client/models/return_code9.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ReturnCode9(BaseModel): + """ + ReturnCode9 + """ # noqa: E501 + return_code: Dict[str, Any] = Field(alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReturnCode9 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReturnCode9 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/rsa.py b/zitadel_client/models/rsa.py new file mode 100644 index 00000000..965135ad --- /dev/null +++ b/zitadel_client/models/rsa.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_web_key_service_rsa import BetaWebKeyServiceRSA +from typing import Optional, Set +from typing_extensions import Self + +class Rsa(BaseModel): + """ + Rsa + """ # noqa: E501 + rsa: BetaWebKeyServiceRSA + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Rsa from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of rsa + if self.rsa: + _dict['rsa'] = self.rsa.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Rsa from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rsa": BetaWebKeyServiceRSA.from_dict(obj["rsa"]) if obj.get("rsa") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/saml.py b/zitadel_client/models/saml.py new file mode 100644 index 00000000..cb2e5747 --- /dev/null +++ b/zitadel_client/models/saml.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.identity_provider_service_saml_config import IdentityProviderServiceSAMLConfig +from typing import Optional, Set +from typing_extensions import Self + +class Saml(BaseModel): + """ + Saml + """ # noqa: E501 + saml: IdentityProviderServiceSAMLConfig + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Saml from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of saml + if self.saml: + _dict['saml'] = self.saml.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Saml from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "saml": IdentityProviderServiceSAMLConfig.from_dict(obj["saml"]) if obj.get("saml") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/saml1.py b/zitadel_client/models/saml1.py new file mode 100644 index 00000000..a93ee93d --- /dev/null +++ b/zitadel_client/models/saml1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_idpsaml_access_information import UserServiceIDPSAMLAccessInformation +from typing import Optional, Set +from typing_extensions import Self + +class Saml1(BaseModel): + """ + Saml1 + """ # noqa: E501 + saml: UserServiceIDPSAMLAccessInformation + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Saml1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of saml + if self.saml: + _dict['saml'] = self.saml.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Saml1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "saml": UserServiceIDPSAMLAccessInformation.from_dict(obj["saml"]) if obj.get("saml") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/saml2.py b/zitadel_client/models/saml2.py new file mode 100644 index 00000000..98231b50 --- /dev/null +++ b/zitadel_client/models/saml2.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_idpsaml_access_information import BetaUserServiceIDPSAMLAccessInformation +from typing import Optional, Set +from typing_extensions import Self + +class Saml2(BaseModel): + """ + Saml2 + """ # noqa: E501 + saml: BetaUserServiceIDPSAMLAccessInformation + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Saml2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of saml + if self.saml: + _dict['saml'] = self.saml.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Saml2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "saml": BetaUserServiceIDPSAMLAccessInformation.from_dict(obj["saml"]) if obj.get("saml") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/saml_service_any.py b/zitadel_client/models/saml_service_any.py new file mode 100644 index 00000000..d6da1039 --- /dev/null +++ b/zitadel_client/models/saml_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class SAMLServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SAMLServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SAMLServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/saml_service_authorization_error.py b/zitadel_client/models/saml_service_authorization_error.py index 2792b3fc..f2399089 100644 --- a/zitadel_client/models/saml_service_authorization_error.py +++ b/zitadel_client/models/saml_service_authorization_error.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.saml_service_error_reason import SAMLServiceErrorReason from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class SAMLServiceAuthorizationError(BaseModel): """ SAMLServiceAuthorizationError """ # noqa: E501 - error: Optional[SAMLServiceErrorReason] = SAMLServiceErrorReason.ERROR_REASON_UNSPECIFIED + error: Optional[SAMLServiceErrorReason] = None error_description: Optional[StrictStr] = Field(default=None, alias="errorDescription") model_config = ConfigDict( @@ -69,6 +69,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if error_description (nullable) is None + # and model_fields_set contains the field + if self.error_description is None and "error_description" in self.model_fields_set: + _dict['errorDescription'] = None + return _dict @classmethod @@ -81,7 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "error": obj.get("error") if obj.get("error") is not None else SAMLServiceErrorReason.ERROR_REASON_UNSPECIFIED, + "error": obj.get("error"), "errorDescription": obj.get("errorDescription") }) return _obj diff --git a/zitadel_client/models/saml_service_connect_error.py b/zitadel_client/models/saml_service_connect_error.py new file mode 100644 index 00000000..bfae99c0 --- /dev/null +++ b/zitadel_client/models/saml_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.saml_service_any import SAMLServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class SAMLServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[SAMLServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SAMLServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SAMLServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": SAMLServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + 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..71ad6ab0 100644 --- a/zitadel_client/models/saml_service_create_response_request.py +++ b/zitadel_client/models/saml_service_create_response_request.py @@ -13,78 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.error1 import Error1 +from zitadel_client.models.session1 import Session1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.saml_service_authorization_error import SAMLServiceAuthorizationError -from zitadel_client.models.saml_service_session import SAMLServiceSession -from typing import Optional, Set -from typing_extensions import Self +SAMLSERVICECREATERESPONSEREQUEST_ONE_OF_SCHEMAS = ["Error1", "Session1"] class SAMLServiceCreateResponseRequest(BaseModel): """ SAMLServiceCreateResponseRequest - """ # noqa: E501 - session: Optional[SAMLServiceSession] = None - error: Optional[SAMLServiceAuthorizationError] = None + """ + # data type: Error1 + oneof_schema_1_validator: Optional[Error1] = None + # data type: Session1 + oneof_schema_2_validator: Optional[Session1] = None + actual_instance: Optional[Union[Error1, Session1]] = None + one_of_schemas: Set[str] = { "Error1", "Session1" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SAMLServiceCreateResponseRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: Error1 + if not isinstance(v, Error1): + error_messages.append(f"Error! Input type `{type(v)}` is not `Error1`") + else: + match += 1 + # validate data type: Session1 + if not isinstance(v, Session1): + error_messages.append(f"Error! Input type `{type(v)}` is not `Session1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SAMLServiceCreateResponseRequest with oneOf schemas: Error1, Session1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SAMLServiceCreateResponseRequest with oneOf schemas: Error1, Session1. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SAMLServiceCreateResponseRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SAMLServiceCreateResponseRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Error1 + try: + instance.actual_instance = Error1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Session1 + try: + instance.actual_instance = Session1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SAMLServiceCreateResponseRequest with oneOf schemas: Error1, Session1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SAMLServiceCreateResponseRequest with oneOf schemas: Error1, Session1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Error1, Session1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _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 - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/saml_service_create_response_response.py b/zitadel_client/models/saml_service_create_response_response.py index 0e78e346..d40ef828 100644 --- a/zitadel_client/models/saml_service_create_response_response.py +++ b/zitadel_client/models/saml_service_create_response_response.py @@ -13,82 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.post import Post +from zitadel_client.models.redirect import Redirect +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.saml_service_details import SAMLServiceDetails -from zitadel_client.models.saml_service_post_response import SAMLServicePostResponse -from typing import Optional, Set -from typing_extensions import Self +SAMLSERVICECREATERESPONSERESPONSE_ONE_OF_SCHEMAS = ["Post", "Redirect"] class SAMLServiceCreateResponseResponse(BaseModel): """ SAMLServiceCreateResponseResponse - """ # noqa: E501 - details: Optional[SAMLServiceDetails] = None - 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 + """ + # data type: Post + oneof_schema_1_validator: Optional[Post] = None + # data type: Redirect + oneof_schema_2_validator: Optional[Redirect] = None + actual_instance: Optional[Union[Post, Redirect]] = None + one_of_schemas: Set[str] = { "Post", "Redirect" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SAMLServiceCreateResponseResponse.model_construct() + error_messages = [] + match = 0 + # validate data type: Post + if not isinstance(v, Post): + error_messages.append(f"Error! Input type `{type(v)}` is not `Post`") + else: + match += 1 + # validate data type: Redirect + if not isinstance(v, Redirect): + error_messages.append(f"Error! Input type `{type(v)}` is not `Redirect`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SAMLServiceCreateResponseResponse with oneOf schemas: Post, Redirect. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SAMLServiceCreateResponseResponse with oneOf schemas: Post, Redirect. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SAMLServiceCreateResponseResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SAMLServiceCreateResponseResponse from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Post + try: + instance.actual_instance = Post.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Redirect + try: + instance.actual_instance = Redirect.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SAMLServiceCreateResponseResponse with oneOf schemas: Post, Redirect. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SAMLServiceCreateResponseResponse with oneOf schemas: Post, Redirect. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Post, Redirect]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _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 - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/saml_service_details.py b/zitadel_client/models/saml_service_details.py index 76c92d1b..ba0caac1 100644 --- a/zitadel_client/models/saml_service_details.py +++ b/zitadel_client/models/saml_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,10 @@ class SAMLServiceDetails(BaseModel): """ SAMLServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - 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") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") model_config = ConfigDict( populate_by_name=True, @@ -71,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/saml_service_get_saml_request_request.py b/zitadel_client/models/saml_service_get_saml_request_request.py new file mode 100644 index 00000000..890589bd --- /dev/null +++ b/zitadel_client/models/saml_service_get_saml_request_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SAMLServiceGetSAMLRequestRequest(BaseModel): + """ + SAMLServiceGetSAMLRequestRequest + """ # noqa: E501 + saml_request_id: Optional[StrictStr] = Field(default=None, description="ID of the SAML Request, as obtained from the redirect URL.", alias="samlRequestId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SAMLServiceGetSAMLRequestRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SAMLServiceGetSAMLRequestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "samlRequestId": obj.get("samlRequestId") + }) + 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..8943d86c 100644 --- a/zitadel_client/models/saml_service_get_saml_request_response.py +++ b/zitadel_client/models/saml_service_get_saml_request_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.saml_service_saml_request import SAMLServiceSAMLRequest from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/saml_service_post_response.py b/zitadel_client/models/saml_service_post_response.py index 9c0141d4..c98437fa 100644 --- a/zitadel_client/models/saml_service_post_response.py +++ b/zitadel_client/models/saml_service_post_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/saml_service_saml_request.py b/zitadel_client/models/saml_service_saml_request.py index db94f7f4..e4451469 100644 --- a/zitadel_client/models/saml_service_saml_request.py +++ b/zitadel_client/models/saml_service_saml_request.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,12 +27,12 @@ class SAMLServiceSAMLRequest(BaseModel): """ SAMLServiceSAMLRequest """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="ID of the SAMLRequest") - creation_date: Optional[datetime] = Field(default=None, description="Time when the SAMLRequest was created", alias="creationDate") - issuer: Optional[StrictStr] = Field(default=None, description="SAML entityID of the application that created the SAMLRequest") - 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") + id: Optional[StrictStr] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + issuer: Optional[StrictStr] = None + assertion_consumer_service: Optional[StrictStr] = Field(default=None, alias="assertionConsumerService") + relay_state: Optional[StrictStr] = Field(default=None, alias="relayState") + binding: Optional[StrictStr] = None model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/saml_service_session.py b/zitadel_client/models/saml_service_session.py index 34d121e9..1ca453a0 100644 --- a/zitadel_client/models/saml_service_session.py +++ b/zitadel_client/models/saml_service_session.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,8 @@ class SAMLServiceSession(BaseModel): """ SAMLServiceSession """ # 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") + session_id: Optional[StrictStr] = 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[StrictStr] = Field(default=None, description="Token to verify the session is valid.", alias="sessionToken") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/send_code.py b/zitadel_client/models/send_code.py new file mode 100644 index 00000000..1b4bddd2 --- /dev/null +++ b/zitadel_client/models/send_code.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_session_service_send_code import BetaSessionServiceSendCode +from typing import Optional, Set +from typing_extensions import Self + +class SendCode(BaseModel): + """ + SendCode + """ # noqa: E501 + send_code: BetaSessionServiceSendCode = Field(alias="sendCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendCode": BetaSessionServiceSendCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/send_code1.py b/zitadel_client/models/send_code1.py new file mode 100644 index 00000000..a164aef4 --- /dev/null +++ b/zitadel_client/models/send_code1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.session_service_send_code import SessionServiceSendCode +from typing import Optional, Set +from typing_extensions import Self + +class SendCode1(BaseModel): + """ + SendCode1 + """ # noqa: E501 + send_code: SessionServiceSendCode = Field(alias="sendCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendCode1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendCode1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendCode": SessionServiceSendCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/send_code10.py b/zitadel_client/models/send_code10.py new file mode 100644 index 00000000..b665f06b --- /dev/null +++ b/zitadel_client/models/send_code10.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SendCode10(BaseModel): + """ + SendCode10 + """ # noqa: E501 + send_code: Dict[str, Any] = Field(alias="sendCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendCode10 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendCode10 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendCode": obj.get("sendCode") + }) + return _obj + + diff --git a/zitadel_client/models/send_code2.py b/zitadel_client/models/send_code2.py new file mode 100644 index 00000000..d0315174 --- /dev/null +++ b/zitadel_client/models/send_code2.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_send_email_verification_code import UserServiceSendEmailVerificationCode +from typing import Optional, Set +from typing_extensions import Self + +class SendCode2(BaseModel): + """ + SendCode2 + """ # noqa: E501 + send_code: UserServiceSendEmailVerificationCode = Field(alias="sendCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendCode2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendCode2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/send_code3.py b/zitadel_client/models/send_code3.py new file mode 100644 index 00000000..f67e088d --- /dev/null +++ b/zitadel_client/models/send_code3.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SendCode3(BaseModel): + """ + SendCode3 + """ # noqa: E501 + send_code: Dict[str, Any] = Field(alias="sendCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendCode3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendCode3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendCode": obj.get("sendCode") + }) + return _obj + + diff --git a/zitadel_client/models/send_code4.py b/zitadel_client/models/send_code4.py new file mode 100644 index 00000000..a5a9552c --- /dev/null +++ b/zitadel_client/models/send_code4.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_send_invite_code import UserServiceSendInviteCode +from typing import Optional, Set +from typing_extensions import Self + +class SendCode4(BaseModel): + """ + SendCode4 + """ # noqa: E501 + send_code: UserServiceSendInviteCode = Field(alias="sendCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendCode4 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendCode4 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendCode": UserServiceSendInviteCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/send_code5.py b/zitadel_client/models/send_code5.py new file mode 100644 index 00000000..227998c9 --- /dev/null +++ b/zitadel_client/models/send_code5.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.organization_service_send_email_verification_code import OrganizationServiceSendEmailVerificationCode +from typing import Optional, Set +from typing_extensions import Self + +class SendCode5(BaseModel): + """ + SendCode5 + """ # noqa: E501 + send_code: OrganizationServiceSendEmailVerificationCode = Field(alias="sendCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendCode5 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendCode5 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendCode": OrganizationServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/send_code6.py b/zitadel_client/models/send_code6.py new file mode 100644 index 00000000..02aa77b2 --- /dev/null +++ b/zitadel_client/models/send_code6.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SendCode6(BaseModel): + """ + SendCode6 + """ # noqa: E501 + send_code: Dict[str, Any] = Field(alias="sendCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendCode6 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendCode6 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendCode": obj.get("sendCode") + }) + return _obj + + diff --git a/zitadel_client/models/send_code7.py b/zitadel_client/models/send_code7.py new file mode 100644 index 00000000..bfc3936d --- /dev/null +++ b/zitadel_client/models/send_code7.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_send_email_verification_code import BetaUserServiceSendEmailVerificationCode +from typing import Optional, Set +from typing_extensions import Self + +class SendCode7(BaseModel): + """ + SendCode7 + """ # noqa: E501 + send_code: BetaUserServiceSendEmailVerificationCode = Field(alias="sendCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendCode7 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendCode7 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendCode": BetaUserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/send_code8.py b/zitadel_client/models/send_code8.py new file mode 100644 index 00000000..5078c22f --- /dev/null +++ b/zitadel_client/models/send_code8.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SendCode8(BaseModel): + """ + SendCode8 + """ # noqa: E501 + send_code: Dict[str, Any] = Field(alias="sendCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendCode8 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendCode8 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendCode": obj.get("sendCode") + }) + return _obj + + diff --git a/zitadel_client/models/send_code9.py b/zitadel_client/models/send_code9.py new file mode 100644 index 00000000..d0f87eab --- /dev/null +++ b/zitadel_client/models/send_code9.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_organization_service_send_email_verification_code import BetaOrganizationServiceSendEmailVerificationCode +from typing import Optional, Set +from typing_extensions import Self + +class SendCode9(BaseModel): + """ + SendCode9 + """ # noqa: E501 + send_code: BetaOrganizationServiceSendEmailVerificationCode = Field(alias="sendCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendCode9 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendCode9 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendCode": BetaOrganizationServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/send_link.py b/zitadel_client/models/send_link.py new file mode 100644 index 00000000..b5637b87 --- /dev/null +++ b/zitadel_client/models/send_link.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_send_passkey_registration_link import UserServiceSendPasskeyRegistrationLink +from typing import Optional, Set +from typing_extensions import Self + +class SendLink(BaseModel): + """ + SendLink + """ # noqa: E501 + send_link: UserServiceSendPasskeyRegistrationLink = Field(alias="sendLink") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_link + if self.send_link: + _dict['sendLink'] = self.send_link.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendLink": UserServiceSendPasskeyRegistrationLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/send_link1.py b/zitadel_client/models/send_link1.py new file mode 100644 index 00000000..d9877c7c --- /dev/null +++ b/zitadel_client/models/send_link1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_send_password_reset_link import UserServiceSendPasswordResetLink +from typing import Optional, Set +from typing_extensions import Self + +class SendLink1(BaseModel): + """ + SendLink1 + """ # noqa: E501 + send_link: UserServiceSendPasswordResetLink = Field(alias="sendLink") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendLink1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_link + if self.send_link: + _dict['sendLink'] = self.send_link.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendLink1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendLink": UserServiceSendPasswordResetLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/send_link2.py b/zitadel_client/models/send_link2.py new file mode 100644 index 00000000..6ae543e1 --- /dev/null +++ b/zitadel_client/models/send_link2.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_send_passkey_registration_link import BetaUserServiceSendPasskeyRegistrationLink +from typing import Optional, Set +from typing_extensions import Self + +class SendLink2(BaseModel): + """ + SendLink2 + """ # noqa: E501 + send_link: BetaUserServiceSendPasskeyRegistrationLink = Field(alias="sendLink") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendLink2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_link + if self.send_link: + _dict['sendLink'] = self.send_link.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendLink2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendLink": BetaUserServiceSendPasskeyRegistrationLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/send_link3.py b/zitadel_client/models/send_link3.py new file mode 100644 index 00000000..f1307555 --- /dev/null +++ b/zitadel_client/models/send_link3.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_send_password_reset_link import BetaUserServiceSendPasswordResetLink +from typing import Optional, Set +from typing_extensions import Self + +class SendLink3(BaseModel): + """ + SendLink3 + """ # noqa: E501 + send_link: BetaUserServiceSendPasswordResetLink = Field(alias="sendLink") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendLink3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_link + if self.send_link: + _dict['sendLink'] = self.send_link.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendLink3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sendLink": BetaUserServiceSendPasswordResetLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/service.py b/zitadel_client/models/service.py new file mode 100644 index 00000000..afb85ea8 --- /dev/null +++ b/zitadel_client/models/service.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Service(BaseModel): + """ + Service + """ # noqa: E501 + service: StrictStr = Field(description="GRPC-service as condition.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Service from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Service from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "service": obj.get("service") + }) + return _obj + + diff --git a/zitadel_client/models/session.py b/zitadel_client/models/session.py new file mode 100644 index 00000000..b770c3d4 --- /dev/null +++ b/zitadel_client/models/session.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.oidc_service_session import OIDCServiceSession +from typing import Optional, Set +from typing_extensions import Self + +class Session(BaseModel): + """ + Session + """ # noqa: E501 + session: OIDCServiceSession + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Session from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of session + if self.session: + _dict['session'] = self.session.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Session from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "session": OIDCServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/session1.py b/zitadel_client/models/session1.py new file mode 100644 index 00000000..dc34c74a --- /dev/null +++ b/zitadel_client/models/session1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.saml_service_session import SAMLServiceSession +from typing import Optional, Set +from typing_extensions import Self + +class Session1(BaseModel): + """ + Session1 + """ # noqa: E501 + session: SAMLServiceSession + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Session1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of session + if self.session: + _dict['session'] = self.session.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Session1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "session": SAMLServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/session2.py b/zitadel_client/models/session2.py new file mode 100644 index 00000000..ffbe841f --- /dev/null +++ b/zitadel_client/models/session2.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_oidc_service_session import BetaOIDCServiceSession +from typing import Optional, Set +from typing_extensions import Self + +class Session2(BaseModel): + """ + Session2 + """ # noqa: E501 + session: BetaOIDCServiceSession + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Session2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of session + if self.session: + _dict['session'] = self.session.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Session2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "session": BetaOIDCServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/session_service_any.py b/zitadel_client/models/session_service_any.py new file mode 100644 index 00000000..82c3ef36 --- /dev/null +++ b/zitadel_client/models/session_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class SessionServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SessionServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SessionServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/session_service_challenges.py b/zitadel_client/models/session_service_challenges.py index 0c9df904..d99d4326 100644 --- a/zitadel_client/models/session_service_challenges.py +++ b/zitadel_client/models/session_service_challenges.py @@ -18,8 +18,8 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.session_service_challenges_web_auth_n import SessionServiceChallengesWebAuthN +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.session_service_web_auth_n import SessionServiceWebAuthN from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class SessionServiceChallenges(BaseModel): """ SessionServiceChallenges """ # noqa: E501 - web_auth_n: Optional[SessionServiceChallengesWebAuthN] = Field(default=None, alias="webAuthN") + web_auth_n: Optional[SessionServiceWebAuthN] = Field(default=None, alias="webAuthN") otp_sms: Optional[StrictStr] = Field(default=None, alias="otpSms") otp_email: Optional[StrictStr] = Field(default=None, alias="otpEmail") @@ -73,6 +73,16 @@ 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() + # set to None if otp_sms (nullable) is None + # and model_fields_set contains the field + if self.otp_sms is None and "otp_sms" in self.model_fields_set: + _dict['otpSms'] = None + + # set to None if otp_email (nullable) is None + # and model_fields_set contains the field + if self.otp_email is None and "otp_email" in self.model_fields_set: + _dict['otpEmail'] = None + return _dict @classmethod @@ -85,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "webAuthN": SessionServiceChallengesWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, + "webAuthN": SessionServiceWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, "otpSms": obj.get("otpSms"), "otpEmail": obj.get("otpEmail") }) diff --git a/zitadel_client/models/session_service_check_idp_intent.py b/zitadel_client/models/session_service_check_idp_intent.py index e1f93e4f..0df05a0f 100644 --- a/zitadel_client/models/session_service_check_idp_intent.py +++ b/zitadel_client/models/session_service_check_idp_intent.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,8 @@ class SessionServiceCheckIDPIntent(BaseModel): """ SessionServiceCheckIDPIntent """ # 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") + idp_intent_id: Optional[StrictStr] = Field(default=None, alias="idpIntentId") + idp_intent_token: Optional[StrictStr] = Field(default=None, alias="idpIntentToken") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_check_otp.py b/zitadel_client/models/session_service_check_otp.py index 6c68dd85..efa9b8d7 100644 --- a/zitadel_client/models/session_service_check_otp.py +++ b/zitadel_client/models/session_service_check_otp.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ class SessionServiceCheckOTP(BaseModel): """ SessionServiceCheckOTP """ # noqa: E501 - code: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + code: Optional[StrictStr] = None model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_check_password.py b/zitadel_client/models/session_service_check_password.py index 0a3bb39e..c8dbc23a 100644 --- a/zitadel_client/models/session_service_check_password.py +++ b/zitadel_client/models/session_service_check_password.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ class SessionServiceCheckPassword(BaseModel): """ SessionServiceCheckPassword """ # noqa: E501 - password: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None + password: Optional[StrictStr] = None model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_check_totp.py b/zitadel_client/models/session_service_check_totp.py index 0d9281d3..0065d48e 100644 --- a/zitadel_client/models/session_service_check_totp.py +++ b/zitadel_client/models/session_service_check_totp.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ class SessionServiceCheckTOTP(BaseModel): """ SessionServiceCheckTOTP """ # noqa: E501 - code: Optional[Annotated[str, Field(min_length=6, strict=True, max_length=6)]] = None + code: Optional[StrictStr] = None model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_check_user.py b/zitadel_client/models/session_service_check_user.py index c1ca9328..3623558e 100644 --- a/zitadel_client/models/session_service_check_user.py +++ b/zitadel_client/models/session_service_check_user.py @@ -13,77 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.login_name import LoginName +from zitadel_client.models.user_id import UserId +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self +SESSIONSERVICECHECKUSER_ONE_OF_SCHEMAS = ["LoginName", "UserId"] class SessionServiceCheckUser(BaseModel): """ SessionServiceCheckUser - """ # 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") + """ + # data type: LoginName + oneof_schema_1_validator: Optional[LoginName] = None + # data type: UserId + oneof_schema_2_validator: Optional[UserId] = None + actual_instance: Optional[Union[LoginName, UserId]] = None + one_of_schemas: Set[str] = { "LoginName", "UserId" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SessionServiceCheckUser.model_construct() + error_messages = [] + match = 0 + # validate data type: LoginName + if not isinstance(v, LoginName): + error_messages.append(f"Error! Input type `{type(v)}` is not `LoginName`") + else: + match += 1 + # validate data type: UserId + if not isinstance(v, UserId): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserId`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SessionServiceCheckUser with oneOf schemas: LoginName, UserId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SessionServiceCheckUser with oneOf schemas: LoginName, UserId. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceCheckUser from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceCheckUser from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into LoginName + try: + instance.actual_instance = LoginName.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserId + try: + instance.actual_instance = UserId.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SessionServiceCheckUser with oneOf schemas: LoginName, UserId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SessionServiceCheckUser with oneOf schemas: LoginName, UserId. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], LoginName, UserId]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _obj = cls.model_validate({ - "userId": obj.get("userId"), - "loginName": obj.get("loginName") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) 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..698b4d07 100644 --- a/zitadel_client/models/session_service_check_web_auth_n.py +++ b/zitadel_client/models/session_service_check_web_auth_n.py @@ -18,7 +18,8 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.session_service_value import SessionServiceValue from typing import Optional, Set from typing_extensions import Self @@ -26,7 +27,7 @@ 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") + credential_assertion_data: Dict[str, Optional[SessionServiceValue]] = Field(description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="credentialAssertionData") model_config = ConfigDict( populate_by_name=True, @@ -67,6 +68,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each value in credential_assertion_data (dict) + _field_dict = {} + if self.credential_assertion_data: + for _key_credential_assertion_data in self.credential_assertion_data: + if self.credential_assertion_data[_key_credential_assertion_data]: + _field_dict[_key_credential_assertion_data] = self.credential_assertion_data[_key_credential_assertion_data].to_dict() + _dict['credentialAssertionData'] = _field_dict return _dict @classmethod @@ -79,7 +87,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "credentialAssertionData": obj.get("credentialAssertionData") + "credentialAssertionData": dict( + (_k, SessionServiceValue.from_dict(_v)) + for _k, _v in obj["credentialAssertionData"].items() + ) + if obj.get("credentialAssertionData") is not None + else None }) return _obj diff --git a/zitadel_client/models/session_service_checks.py b/zitadel_client/models/session_service_checks.py index 986f82e5..fb1b83dd 100644 --- a/zitadel_client/models/session_service_checks.py +++ b/zitadel_client/models/session_service_checks.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_check_idp_intent import SessionServiceCheckIDPIntent from zitadel_client.models.session_service_check_otp import SessionServiceCheckOTP from zitadel_client.models.session_service_check_password import SessionServiceCheckPassword diff --git a/zitadel_client/models/session_service_connect_error.py b/zitadel_client/models/session_service_connect_error.py new file mode 100644 index 00000000..fef7b9b5 --- /dev/null +++ b/zitadel_client/models/session_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.session_service_any import SessionServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class SessionServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[SessionServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SessionServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SessionServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": SessionServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + 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..4d008d00 100644 --- a/zitadel_client/models/session_service_create_session_request.py +++ b/zitadel_client/models/session_service_create_session_request.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, Optional, Union from zitadel_client.models.session_service_checks import SessionServiceChecks from zitadel_client.models.session_service_request_challenges import SessionServiceRequestChallenges from zitadel_client.models.session_service_user_agent import SessionServiceUserAgent @@ -30,10 +30,10 @@ class SessionServiceCreateSessionRequest(BaseModel): SessionServiceCreateSessionRequest """ # noqa: E501 checks: Optional[SessionServiceChecks] = None - metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = Field(default=None, description="\"custom key value list to be stored on the session\"") + metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = None 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\"") + lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_create_session_response.py b/zitadel_client/models/session_service_create_session_response.py index 8f721c91..eea5bd16 100644 --- a/zitadel_client/models/session_service_create_session_response.py +++ b/zitadel_client/models/session_service_create_session_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_challenges import SessionServiceChallenges from zitadel_client.models.session_service_details import SessionServiceDetails from typing import Optional, Set @@ -29,8 +29,8 @@ class SessionServiceCreateSessionResponse(BaseModel): SessionServiceCreateSessionResponse """ # noqa: E501 details: Optional[SessionServiceDetails] = None - 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") + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") challenges: Optional[SessionServiceChallenges] = None model_config = ConfigDict( diff --git a/zitadel_client/models/session_service_creation_date_query.py b/zitadel_client/models/session_service_creation_date_query.py index 838aefcc..21f49847 100644 --- a/zitadel_client/models/session_service_creation_date_query.py +++ b/zitadel_client/models/session_service_creation_date_query.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_timestamp_query_method import SessionServiceTimestampQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +28,8 @@ class SessionServiceCreationDateQuery(BaseModel): """ SessionServiceCreationDateQuery """ # noqa: E501 - creation_date: Optional[datetime] = Field(default=None, alias="creationDate") - method: Optional[SessionServiceTimestampQueryMethod] = SessionServiceTimestampQueryMethod.TIMESTAMP_QUERY_METHOD_EQUALS + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + method: Optional[SessionServiceTimestampQueryMethod] = None model_config = ConfigDict( populate_by_name=True, @@ -83,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "creationDate": obj.get("creationDate"), - "method": obj.get("method") if obj.get("method") is not None else SessionServiceTimestampQueryMethod.TIMESTAMP_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/session_service_creator_query.py b/zitadel_client/models/session_service_creator_query.py index da4b86a7..2ccab47c 100644 --- a/zitadel_client/models/session_service_creator_query.py +++ b/zitadel_client/models/session_service_creator_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ 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.") + id: Optional[StrictStr] = Field(default=None, description="ID of the user who created the session. If empty, the calling user's ID is used.") model_config = ConfigDict( populate_by_name=True, @@ -68,6 +67,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + return _dict @classmethod diff --git a/zitadel_client/models/session_service_delete_session_request.py b/zitadel_client/models/session_service_delete_session_request.py index e8de81bd..ac8af4db 100644 --- a/zitadel_client/models/session_service_delete_session_request.py +++ b/zitadel_client/models/session_service_delete_session_request.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,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") + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") model_config = ConfigDict( populate_by_name=True, @@ -67,6 +68,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if session_token (nullable) is None + # and model_fields_set contains the field + if self.session_token is None and "session_token" in self.model_fields_set: + _dict['sessionToken'] = None + return _dict @classmethod @@ -79,6 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "sessionId": obj.get("sessionId"), "sessionToken": obj.get("sessionToken") }) 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..75a76e92 100644 --- a/zitadel_client/models/session_service_delete_session_response.py +++ b/zitadel_client/models/session_service_delete_session_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_details import SessionServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/session_service_details.py b/zitadel_client/models/session_service_details.py index f37a3b4b..f8406b0c 100644 --- a/zitadel_client/models/session_service_details.py +++ b/zitadel_client/models/session_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,10 @@ class SessionServiceDetails(BaseModel): """ SessionServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - 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") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") model_config = ConfigDict( populate_by_name=True, @@ -71,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/session_service_factors.py b/zitadel_client/models/session_service_factors.py index 194fa345..c7397557 100644 --- a/zitadel_client/models/session_service_factors.py +++ b/zitadel_client/models/session_service_factors.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_intent_factor import SessionServiceIntentFactor from zitadel_client.models.session_service_otp_factor import SessionServiceOTPFactor from zitadel_client.models.session_service_password_factor import SessionServicePasswordFactor diff --git a/zitadel_client/models/action_service_beta_update_target_response.py b/zitadel_client/models/session_service_get_session_request.py similarity index 74% rename from zitadel_client/models/action_service_beta_update_target_response.py rename to zitadel_client/models/session_service_get_session_request.py index 0056e065..7c1f120a 100644 --- a/zitadel_client/models/action_service_beta_update_target_response.py +++ b/zitadel_client/models/session_service_get_session_request.py @@ -17,18 +17,17 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaUpdateTargetResponse(BaseModel): +class SessionServiceGetSessionRequest(BaseModel): """ - ActionServiceBetaUpdateTargetResponse + SessionServiceGetSessionRequest """ # 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") + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") model_config = ConfigDict( populate_by_name=True, @@ -48,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaUpdateTargetResponse from a JSON string""" + """Create an instance of SessionServiceGetSessionRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -69,11 +68,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if session_token (nullable) is None + # and model_fields_set contains the field + if self.session_token is None and "session_token" in self.model_fields_set: + _dict['sessionToken'] = None + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaUpdateTargetResponse from a dict""" + """Create an instance of SessionServiceGetSessionRequest from a dict""" if obj is None: return None @@ -81,8 +85,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "changeDate": obj.get("changeDate"), - "signingKey": obj.get("signingKey") + "sessionId": obj.get("sessionId"), + "sessionToken": obj.get("sessionToken") }) 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..b6aa7157 100644 --- a/zitadel_client/models/session_service_get_session_response.py +++ b/zitadel_client/models/session_service_get_session_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_session import SessionServiceSession from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/session_service_header_values.py b/zitadel_client/models/session_service_header_values.py new file mode 100644 index 00000000..dc278b02 --- /dev/null +++ b/zitadel_client/models/session_service_header_values.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SessionServiceHeaderValues(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 + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SessionServiceHeaderValues from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SessionServiceHeaderValues from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "values": obj.get("values") + }) + return _obj + + diff --git a/zitadel_client/models/session_service_intent_factor.py b/zitadel_client/models/session_service_intent_factor.py index 0c7652a4..9f791fb8 100644 --- a/zitadel_client/models/session_service_intent_factor.py +++ b/zitadel_client/models/session_service_intent_factor.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class SessionServiceIntentFactor(BaseModel): """ SessionServiceIntentFactor """ # noqa: E501 - verified_at: Optional[datetime] = Field(default=None, description="\"time when an intent was last checked\"", alias="verifiedAt") + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_list_details.py b/zitadel_client/models/session_service_list_details.py index e31d9ac0..ad320f73 100644 --- a/zitadel_client/models/session_service_list_details.py +++ b/zitadel_client/models/session_service_list_details.py @@ -18,8 +18,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,9 @@ class SessionServiceListDetails(BaseModel): """ SessionServiceListDetails """ # noqa: E501 - 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") + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") model_config = ConfigDict( populate_by_name=True, @@ -70,6 +70,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/session_service_list_query.py b/zitadel_client/models/session_service_list_query.py index df019995..406f740b 100644 --- a/zitadel_client/models/session_service_list_query.py +++ b/zitadel_client/models/session_service_list_query.py @@ -17,18 +17,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self class SessionServiceListQuery(BaseModel): """ - Object unspecific list filters like offset, limit and asc/desc. + SessionServiceListQuery """ # noqa: E501 - 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") + offset: Optional[Any] = None + limit: Optional[StrictInt] = None + asc: Optional[StrictBool] = None model_config = ConfigDict( populate_by_name=True, @@ -69,6 +69,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + return _dict @classmethod diff --git a/zitadel_client/models/session_service_list_sessions_request.py b/zitadel_client/models/session_service_list_sessions_request.py index 497208c7..de6d1d3b 100644 --- a/zitadel_client/models/session_service_list_sessions_request.py +++ b/zitadel_client/models/session_service_list_sessions_request.py @@ -31,7 +31,7 @@ class SessionServiceListSessionsRequest(BaseModel): """ # noqa: E501 query: Optional[SessionServiceListQuery] = None queries: Optional[List[SessionServiceSearchQuery]] = None - sorting_column: Optional[SessionServiceSessionFieldName] = Field(default=SessionServiceSessionFieldName.SESSION_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") + sorting_column: Optional[SessionServiceSessionFieldName] = Field(default=None, alias="sortingColumn") model_config = ConfigDict( populate_by_name=True, @@ -96,7 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "query": SessionServiceListQuery.from_dict(obj["query"]) if obj.get("query") is not None else None, "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 + "sortingColumn": obj.get("sortingColumn") }) return _obj diff --git a/zitadel_client/models/session_service_otp_email.py b/zitadel_client/models/session_service_otp_email.py new file mode 100644 index 00000000..1cd1551f --- /dev/null +++ b/zitadel_client/models/session_service_otp_email.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.return_code1 import ReturnCode1 +from zitadel_client.models.send_code1 import SendCode1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SESSIONSERVICEOTPEMAIL_ONE_OF_SCHEMAS = ["ReturnCode1", "SendCode1"] + +class SessionServiceOTPEmail(BaseModel): + """ + SessionServiceOTPEmail + """ + # data type: ReturnCode1 + oneof_schema_1_validator: Optional[ReturnCode1] = None + # data type: SendCode1 + oneof_schema_2_validator: Optional[SendCode1] = None + actual_instance: Optional[Union[ReturnCode1, SendCode1]] = None + one_of_schemas: Set[str] = { "ReturnCode1", "SendCode1" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SessionServiceOTPEmail.model_construct() + error_messages = [] + match = 0 + # validate data type: ReturnCode1 + if not isinstance(v, ReturnCode1): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode1`") + else: + match += 1 + # validate data type: SendCode1 + if not isinstance(v, SendCode1): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SessionServiceOTPEmail with oneOf schemas: ReturnCode1, SendCode1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SessionServiceOTPEmail with oneOf schemas: ReturnCode1, SendCode1. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ReturnCode1 + try: + instance.actual_instance = ReturnCode1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode1 + try: + instance.actual_instance = SendCode1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SessionServiceOTPEmail with oneOf schemas: ReturnCode1, SendCode1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SessionServiceOTPEmail with oneOf schemas: ReturnCode1, SendCode1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ReturnCode1, SendCode1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/session_service_otp_email_send_code.py b/zitadel_client/models/session_service_otp_email_send_code.py deleted file mode 100644 index 73f2b655..00000000 --- a/zitadel_client/models/session_service_otp_email_send_code.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Zitadel SDK - - The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -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") - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceOTPEmailSendCode from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceOTPEmailSendCode from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "urlTemplate": obj.get("urlTemplate") - }) - return _obj - - diff --git a/zitadel_client/models/session_service_otp_factor.py b/zitadel_client/models/session_service_otp_factor.py index e75c3396..6157ad18 100644 --- a/zitadel_client/models/session_service_otp_factor.py +++ b/zitadel_client/models/session_service_otp_factor.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ 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") + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_otpsms.py b/zitadel_client/models/session_service_otpsms.py new file mode 100644 index 00000000..a3d74a73 --- /dev/null +++ b/zitadel_client/models/session_service_otpsms.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SessionServiceOTPSMS(BaseModel): + """ + SessionServiceOTPSMS + """ # noqa: E501 + return_code: Optional[StrictBool] = Field(default=None, alias="returnCode") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SessionServiceOTPSMS from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SessionServiceOTPSMS from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/session_service_password_factor.py b/zitadel_client/models/session_service_password_factor.py index d9cce51b..9664b369 100644 --- a/zitadel_client/models/session_service_password_factor.py +++ b/zitadel_client/models/session_service_password_factor.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class SessionServicePasswordFactor(BaseModel): """ SessionServicePasswordFactor """ # noqa: E501 - verified_at: Optional[datetime] = Field(default=None, description="\"time when the password was last checked\"", alias="verifiedAt") + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_request_challenges.py b/zitadel_client/models/session_service_request_challenges.py index fecee268..4cb43b7a 100644 --- a/zitadel_client/models/session_service_request_challenges.py +++ b/zitadel_client/models/session_service_request_challenges.py @@ -18,10 +18,10 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.session_service_request_challenges_otp_email import SessionServiceRequestChallengesOTPEmail -from zitadel_client.models.session_service_request_challenges_otpsms import SessionServiceRequestChallengesOTPSMS -from zitadel_client.models.session_service_request_challenges_web_auth_n import SessionServiceRequestChallengesWebAuthN +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.session_service_otp_email import SessionServiceOTPEmail +from zitadel_client.models.session_service_otpsms import SessionServiceOTPSMS +from zitadel_client.models.session_service_web_auth_n import SessionServiceWebAuthN from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class SessionServiceRequestChallenges(BaseModel): """ SessionServiceRequestChallenges """ # noqa: E501 - 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") + web_auth_n: Optional[SessionServiceWebAuthN] = Field(default=None, alias="webAuthN") + otp_sms: Optional[SessionServiceOTPSMS] = Field(default=None, alias="otpSms") + otp_email: Optional[SessionServiceOTPEmail] = Field(default=None, alias="otpEmail") model_config = ConfigDict( populate_by_name=True, @@ -93,9 +93,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "webAuthN": SessionServiceRequestChallengesWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, - "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 + "webAuthN": SessionServiceWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, + "otpSms": SessionServiceOTPSMS.from_dict(obj["otpSms"]) if obj.get("otpSms") is not None else None, + "otpEmail": SessionServiceOTPEmail.from_dict(obj["otpEmail"]) if obj.get("otpEmail") is not None else None }) return _obj diff --git a/zitadel_client/models/session_service_search_query.py b/zitadel_client/models/session_service_search_query.py index 17cbfc9a..7dca9922 100644 --- a/zitadel_client/models/session_service_search_query.py +++ b/zitadel_client/models/session_service_search_query.py @@ -13,87 +13,167 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.session_service_creation_date_query import SessionServiceCreationDateQuery -from zitadel_client.models.session_service_creator_query import SessionServiceCreatorQuery -from zitadel_client.models.session_service_ids_query import SessionServiceIDsQuery -from zitadel_client.models.session_service_user_agent_query import SessionServiceUserAgentQuery -from zitadel_client.models.session_service_user_id_query import SessionServiceUserIDQuery -from typing import Optional, Set -from typing_extensions import Self +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.creation_date_query1 import CreationDateQuery1 +from zitadel_client.models.creator_query import CreatorQuery +from zitadel_client.models.ids_query1 import IdsQuery1 +from zitadel_client.models.user_agent_query import UserAgentQuery +from zitadel_client.models.user_id_query1 import UserIdQuery1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SESSIONSERVICESEARCHQUERY_ONE_OF_SCHEMAS = ["CreationDateQuery1", "CreatorQuery", "IdsQuery1", "UserAgentQuery", "UserIdQuery1"] class SessionServiceSearchQuery(BaseModel): """ SessionServiceSearchQuery - """ # noqa: E501 - ids_query: Optional[SessionServiceIDsQuery] = Field(default=None, alias="idsQuery") - user_id_query: Optional[SessionServiceUserIDQuery] = Field(default=None, alias="userIdQuery") - 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") + """ + # data type: CreationDateQuery1 + oneof_schema_1_validator: Optional[CreationDateQuery1] = None + # data type: CreatorQuery + oneof_schema_2_validator: Optional[CreatorQuery] = None + # data type: IdsQuery1 + oneof_schema_3_validator: Optional[IdsQuery1] = None + # data type: UserAgentQuery + oneof_schema_4_validator: Optional[UserAgentQuery] = None + # data type: UserIdQuery1 + oneof_schema_5_validator: Optional[UserIdQuery1] = None + actual_instance: Optional[Union[CreationDateQuery1, CreatorQuery, IdsQuery1, UserAgentQuery, UserIdQuery1]] = None + one_of_schemas: Set[str] = { "CreationDateQuery1", "CreatorQuery", "IdsQuery1", "UserAgentQuery", "UserIdQuery1" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SessionServiceSearchQuery.model_construct() + error_messages = [] + match = 0 + # validate data type: CreationDateQuery1 + if not isinstance(v, CreationDateQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreationDateQuery1`") + else: + match += 1 + # validate data type: CreatorQuery + if not isinstance(v, CreatorQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreatorQuery`") + else: + match += 1 + # validate data type: IdsQuery1 + if not isinstance(v, IdsQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `IdsQuery1`") + else: + match += 1 + # validate data type: UserAgentQuery + if not isinstance(v, UserAgentQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserAgentQuery`") + else: + match += 1 + # validate data type: UserIdQuery1 + if not isinstance(v, UserIdQuery1): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserIdQuery1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SessionServiceSearchQuery with oneOf schemas: CreationDateQuery1, CreatorQuery, IdsQuery1, UserAgentQuery, UserIdQuery1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SessionServiceSearchQuery with oneOf schemas: CreationDateQuery1, CreatorQuery, IdsQuery1, UserAgentQuery, UserIdQuery1. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceSearchQuery from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceSearchQuery from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into CreationDateQuery1 + try: + instance.actual_instance = CreationDateQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CreatorQuery + try: + instance.actual_instance = CreatorQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into IdsQuery1 + try: + instance.actual_instance = IdsQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserAgentQuery + try: + instance.actual_instance = UserAgentQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserIdQuery1 + try: + instance.actual_instance = UserIdQuery1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SessionServiceSearchQuery with oneOf schemas: CreationDateQuery1, CreatorQuery, IdsQuery1, UserAgentQuery, UserIdQuery1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SessionServiceSearchQuery with oneOf schemas: CreationDateQuery1, CreatorQuery, IdsQuery1, UserAgentQuery, UserIdQuery1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CreationDateQuery1, CreatorQuery, IdsQuery1, UserAgentQuery, UserIdQuery1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - 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 - }) - return _obj + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/session_service_send_code.py b/zitadel_client/models/session_service_send_code.py new file mode 100644 index 00000000..142e316e --- /dev/null +++ b/zitadel_client/models/session_service_send_code.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SessionServiceSendCode(BaseModel): + """ + SessionServiceSendCode + """ # noqa: E501 + url_template: Optional[StrictStr] = 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") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SessionServiceSendCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SessionServiceSendCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/zitadel_client/models/session_service_session.py b/zitadel_client/models/session_service_session.py index 675d77ec..9f3a6618 100644 --- a/zitadel_client/models/session_service_session.py +++ b/zitadel_client/models/session_service_session.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, Optional, Union from zitadel_client.models.session_service_factors import SessionServiceFactors from zitadel_client.models.session_service_user_agent import SessionServiceUserAgent from typing import Optional, Set @@ -29,14 +29,14 @@ class SessionServiceSession(BaseModel): """ SessionServiceSession """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="\"id of the session\"") - creation_date: Optional[datetime] = Field(default=None, description="\"time when the session was created\"", alias="creationDate") - change_date: Optional[datetime] = Field(default=None, description="\"time when the session was last updated\"", alias="changeDate") - sequence: Optional[StrictStr] = Field(default=None, description="\"sequence of the session\"") + id: Optional[StrictStr] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + sequence: Optional[Any] = None factors: Optional[SessionServiceFactors] = None - metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = Field(default=None, description="\"custom key value list\"") + metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = None 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") + expiration_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="expirationDate") model_config = ConfigDict( populate_by_name=True, @@ -83,6 +83,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() + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/session_service_set_session_request.py b/zitadel_client/models/session_service_set_session_request.py index f91634f8..5092aa2c 100644 --- a/zitadel_client/models/session_service_set_session_request.py +++ b/zitadel_client/models/session_service_set_session_request.py @@ -18,8 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated +from typing import Any, ClassVar, Dict, Optional, Union from zitadel_client.models.session_service_checks import SessionServiceChecks from zitadel_client.models.session_service_request_challenges import SessionServiceRequestChallenges from typing import Optional, Set @@ -29,11 +28,12 @@ class SessionServiceSetSessionRequest(BaseModel): """ SessionServiceSetSessionRequest """ # noqa: E501 - session_token: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="\"DEPRECATED: this field is ignored.\"", alias="sessionToken") + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") checks: Optional[SessionServiceChecks] = None - metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = Field(default=None, description="\"custom key value list to be stored on the session\"") + metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = None challenges: Optional[SessionServiceRequestChallenges] = None - lifetime: Optional[StrictStr] = Field(default=None, description="\"duration (in seconds) after which the session will be automatically invalidated\"") + lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") model_config = ConfigDict( populate_by_name=True, @@ -92,6 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "sessionId": obj.get("sessionId"), "sessionToken": obj.get("sessionToken"), "checks": SessionServiceChecks.from_dict(obj["checks"]) if obj.get("checks") is not None else None, "metadata": obj.get("metadata"), diff --git a/zitadel_client/models/session_service_set_session_response.py b/zitadel_client/models/session_service_set_session_response.py index 32e2a013..61032475 100644 --- a/zitadel_client/models/session_service_set_session_response.py +++ b/zitadel_client/models/session_service_set_session_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_challenges import SessionServiceChallenges from zitadel_client.models.session_service_details import SessionServiceDetails from typing import Optional, Set @@ -29,7 +29,7 @@ class SessionServiceSetSessionResponse(BaseModel): SessionServiceSetSessionResponse """ # noqa: E501 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") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") challenges: Optional[SessionServiceChallenges] = None model_config = ConfigDict( diff --git a/zitadel_client/models/session_service_totp_factor.py b/zitadel_client/models/session_service_totp_factor.py index 31fb72db..ecb8eb61 100644 --- a/zitadel_client/models/session_service_totp_factor.py +++ b/zitadel_client/models/session_service_totp_factor.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ 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") + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_user_agent.py b/zitadel_client/models/session_service_user_agent.py index d30cd1e9..e5bb97a9 100644 --- a/zitadel_client/models/session_service_user_agent.py +++ b/zitadel_client/models/session_service_user_agent.py @@ -18,8 +18,8 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.session_service_user_agent_header_values import SessionServiceUserAgentHeaderValues +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.session_service_header_values import SessionServiceHeaderValues from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class SessionServiceUserAgent(BaseModel): fingerprint_id: Optional[StrictStr] = Field(default=None, alias="fingerprintId") ip: Optional[StrictStr] = None description: Optional[StrictStr] = None - header: Optional[Dict[str, SessionServiceUserAgentHeaderValues]] = None + header: Optional[Dict[str, SessionServiceHeaderValues]] = None model_config = ConfigDict( populate_by_name=True, @@ -78,6 +78,21 @@ 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 + # set to None if fingerprint_id (nullable) is None + # and model_fields_set contains the field + if self.fingerprint_id is None and "fingerprint_id" in self.model_fields_set: + _dict['fingerprintId'] = None + + # set to None if ip (nullable) is None + # and model_fields_set contains the field + if self.ip is None and "ip" in self.model_fields_set: + _dict['ip'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + return _dict @classmethod @@ -94,7 +109,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "ip": obj.get("ip"), "description": obj.get("description"), "header": dict( - (_k, SessionServiceUserAgentHeaderValues.from_dict(_v)) + (_k, SessionServiceHeaderValues.from_dict(_v)) for _k, _v in obj["header"].items() ) if obj.get("header") is not None diff --git a/zitadel_client/models/session_service_user_agent_query.py b/zitadel_client/models/session_service_user_agent_query.py index 7b3f8796..25f8f83a 100644 --- a/zitadel_client/models/session_service_user_agent_query.py +++ b/zitadel_client/models/session_service_user_agent_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ 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") + fingerprint_id: Optional[StrictStr] = 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") model_config = ConfigDict( populate_by_name=True, @@ -68,6 +67,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if fingerprint_id (nullable) is None + # and model_fields_set contains the field + if self.fingerprint_id is None and "fingerprint_id" in self.model_fields_set: + _dict['fingerprintId'] = None + return _dict @classmethod diff --git a/zitadel_client/models/session_service_user_factor.py b/zitadel_client/models/session_service_user_factor.py index 02ec4303..ec7f7cc4 100644 --- a/zitadel_client/models/session_service_user_factor.py +++ b/zitadel_client/models/session_service_user_factor.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,11 +27,11 @@ class SessionServiceUserFactor(BaseModel): """ SessionServiceUserFactor """ # noqa: E501 - verified_at: Optional[datetime] = Field(default=None, description="\"time when the user was last checked\"", alias="verifiedAt") - id: Optional[StrictStr] = Field(default=None, description="\"id of the checked user\"") - 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") + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + id: Optional[StrictStr] = None + login_name: Optional[StrictStr] = Field(default=None, alias="loginName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_user_id_query.py b/zitadel_client/models/session_service_user_id_query.py index cafed3f4..9234bf5e 100644 --- a/zitadel_client/models/session_service_user_id_query.py +++ b/zitadel_client/models/session_service_user_id_query.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/session_service_value.py b/zitadel_client/models/session_service_value.py new file mode 100644 index 00000000..689c009f --- /dev/null +++ b/zitadel_client/models/session_service_value.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator +from typing import Any, Dict, List, Optional, Union +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SESSIONSERVICEVALUE_ONE_OF_SCHEMAS = ["Dict[str, object]", "List[str]", "bool", "float", "str"] + +class SessionServiceValue(BaseModel): + """ + `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value. + """ + # data type: float + oneof_schema_1_validator: Optional[Union[StrictFloat, StrictInt]] = None + # data type: str + oneof_schema_2_validator: Optional[StrictStr] = None + # data type: bool + oneof_schema_3_validator: Optional[StrictBool] = None + # data type: List[str] + oneof_schema_4_validator: Optional[List[StrictStr]] = None + # data type: Dict[str, object] + oneof_schema_5_validator: Optional[Dict[str, Any]] = None + actual_instance: Optional[Union[Dict[str, object], List[str], bool, float, str]] = None + one_of_schemas: Set[str] = { "Dict[str, object]", "List[str]", "bool", "float", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = SessionServiceValue.model_construct() + error_messages = [] + match = 0 + # validate data type: float + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: str + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: bool + try: + instance.oneof_schema_3_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: List[str] + try: + instance.oneof_schema_4_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: Dict[str, object] + try: + instance.oneof_schema_5_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SessionServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SessionServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into float + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into str + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into bool + try: + # validation + instance.oneof_schema_3_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_3_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[str] + try: + # validation + instance.oneof_schema_4_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_4_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Dict[str, object] + try: + # validation + instance.oneof_schema_5_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_5_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SessionServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SessionServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Dict[str, object], List[str], bool, float, str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/session_service_request_challenges_web_auth_n.py b/zitadel_client/models/session_service_web_auth_n.py similarity index 80% rename from zitadel_client/models/session_service_request_challenges_web_auth_n.py rename to zitadel_client/models/session_service_web_auth_n.py index 22909f0e..98a895a3 100644 --- a/zitadel_client/models/session_service_request_challenges_web_auth_n.py +++ b/zitadel_client/models/session_service_web_auth_n.py @@ -18,16 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict from zitadel_client.models.session_service_user_verification_requirement import SessionServiceUserVerificationRequirement from typing import Optional, Set from typing_extensions import Self -class SessionServiceRequestChallengesWebAuthN(BaseModel): +class SessionServiceWebAuthN(BaseModel): """ - SessionServiceRequestChallengesWebAuthN + SessionServiceWebAuthN """ # noqa: E501 - domain: StrictStr = Field(description="\"Domain on which the session was created. Will be used in the WebAuthN challenge.\"") + domain: StrictStr user_verification_requirement: SessionServiceUserVerificationRequirement = Field(alias="userVerificationRequirement") model_config = ConfigDict( @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceRequestChallengesWebAuthN from a JSON string""" + """Create an instance of SessionServiceWebAuthN from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceRequestChallengesWebAuthN from a dict""" + """Create an instance of SessionServiceWebAuthN from a dict""" if obj is None: return None @@ -82,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "domain": obj.get("domain"), - "userVerificationRequirement": obj.get("userVerificationRequirement") if obj.get("userVerificationRequirement") is not None else SessionServiceUserVerificationRequirement.USER_VERIFICATION_REQUIREMENT_UNSPECIFIED + "userVerificationRequirement": obj.get("userVerificationRequirement") }) 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..b59ea25c 100644 --- a/zitadel_client/models/session_service_web_auth_n_factor.py +++ b/zitadel_client/models/session_service_web_auth_n_factor.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class SessionServiceWebAuthNFactor(BaseModel): """ SessionServiceWebAuthNFactor """ # noqa: E501 - verified_at: Optional[datetime] = Field(default=None, description="\"time when the passkey challenge was last checked\"", alias="verifiedAt") + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") user_verified: Optional[StrictBool] = Field(default=None, alias="userVerified") model_config = ConfigDict( diff --git a/zitadel_client/models/settings_service_any.py b/zitadel_client/models/settings_service_any.py new file mode 100644 index 00000000..f2ccbea2 --- /dev/null +++ b/zitadel_client/models/settings_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_auto_linking_option.py b/zitadel_client/models/settings_service_auto_linking_option.py index bb1e5d46..16e287b7 100644 --- a/zitadel_client/models/settings_service_auto_linking_option.py +++ b/zitadel_client/models/settings_service_auto_linking_option.py @@ -20,7 +20,7 @@ class SettingsServiceAutoLinkingOption(str, Enum): """ - - AUTO_LINKING_OPTION_UNSPECIFIED: AUTO_LINKING_OPTION_UNSPECIFIED disables the auto linking prompt. - AUTO_LINKING_OPTION_USERNAME: AUTO_LINKING_OPTION_USERNAME will use the username of the external user to check for a corresponding ZITADEL user. - AUTO_LINKING_OPTION_EMAIL: AUTO_LINKING_OPTION_EMAIL will use the email of the external user to check for a corresponding ZITADEL user with the same verified email Note that in case multiple users match, no prompt will be shown. + SettingsServiceAutoLinkingOption """ """ diff --git a/zitadel_client/models/settings_service_branding_settings.py b/zitadel_client/models/settings_service_branding_settings.py index 37e0f8d2..ae30e4a9 100644 --- a/zitadel_client/models/settings_service_branding_settings.py +++ b/zitadel_client/models/settings_service_branding_settings.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType from zitadel_client.models.settings_service_theme import SettingsServiceTheme from zitadel_client.models.settings_service_theme_mode import SettingsServiceThemeMode @@ -31,11 +31,11 @@ class SettingsServiceBrandingSettings(BaseModel): """ # noqa: E501 light_theme: Optional[SettingsServiceTheme] = Field(default=None, alias="lightTheme") dark_theme: Optional[SettingsServiceTheme] = Field(default=None, alias="darkTheme") - font_url: Optional[StrictStr] = Field(default=None, description="url to the font used", alias="fontUrl") - hide_login_name_suffix: Optional[StrictBool] = Field(default=None, description="hides the org suffix on the login form if the scope \"urn:zitadel:iam:org:domain:primary:{domainname}\" is set", alias="hideLoginNameSuffix") - 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") + font_url: Optional[StrictStr] = Field(default=None, alias="fontUrl") + hide_login_name_suffix: Optional[StrictBool] = Field(default=None, description="hides the org suffix on the login form if the scope \\\"urn:zitadel:iam:org:domain:primary:{domainname}\\\" is set", alias="hideLoginNameSuffix") + disable_watermark: Optional[StrictBool] = Field(default=None, alias="disableWatermark") + resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + theme_mode: Optional[SettingsServiceThemeMode] = Field(default=None, alias="themeMode") model_config = ConfigDict( populate_by_name=True, @@ -99,8 +99,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "fontUrl": obj.get("fontUrl"), "hideLoginNameSuffix": obj.get("hideLoginNameSuffix"), "disableWatermark": obj.get("disableWatermark"), - "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 + "resourceOwnerType": obj.get("resourceOwnerType"), + "themeMode": obj.get("themeMode") }) return _obj diff --git a/zitadel_client/models/settings_service_connect_error.py b/zitadel_client/models/settings_service_connect_error.py new file mode 100644 index 00000000..836417f1 --- /dev/null +++ b/zitadel_client/models/settings_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.settings_service_any import SettingsServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[SettingsServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": SettingsServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_details.py b/zitadel_client/models/settings_service_details.py index 933616c5..095696d9 100644 --- a/zitadel_client/models/settings_service_details.py +++ b/zitadel_client/models/settings_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,10 @@ class SettingsServiceDetails(BaseModel): """ SettingsServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - 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") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") model_config = ConfigDict( populate_by_name=True, @@ -71,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/settings_service_domain_settings.py b/zitadel_client/models/settings_service_domain_settings.py index 23c62109..bb42cd91 100644 --- a/zitadel_client/models/settings_service_domain_settings.py +++ b/zitadel_client/models/settings_service_domain_settings.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,10 @@ class SettingsServiceDomainSettings(BaseModel): """ SettingsServiceDomainSettings """ # noqa: E501 - login_name_includes_domain: Optional[StrictBool] = Field(default=None, description="the username has to end with the domain of its organization", alias="loginNameIncludesDomain") - 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") + login_name_includes_domain: Optional[StrictBool] = Field(default=None, alias="loginNameIncludesDomain") + require_org_domain_verification: Optional[StrictBool] = Field(default=None, alias="requireOrgDomainVerification") + smtp_sender_address_matches_instance_domain: Optional[StrictBool] = Field(default=None, alias="smtpSenderAddressMatchesInstanceDomain") + resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") model_config = ConfigDict( populate_by_name=True, @@ -86,7 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "loginNameIncludesDomain": obj.get("loginNameIncludesDomain"), "requireOrgDomainVerification": obj.get("requireOrgDomainVerification"), "smtpSenderAddressMatchesInstanceDomain": obj.get("smtpSenderAddressMatchesInstanceDomain"), - "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED + "resourceOwnerType": obj.get("resourceOwnerType") }) 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..00212ee1 100644 --- a/zitadel_client/models/settings_service_embedded_iframe_settings.py +++ b/zitadel_client/models/settings_service_embedded_iframe_settings.py @@ -26,8 +26,8 @@ class SettingsServiceEmbeddedIframeSettings(BaseModel): """ SettingsServiceEmbeddedIframeSettings """ # 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") + enabled: Optional[StrictBool] = None + allowed_origins: Optional[List[StrictStr]] = Field(default=None, alias="allowedOrigins") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_get_active_identity_providers_request.py b/zitadel_client/models/settings_service_get_active_identity_providers_request.py new file mode 100644 index 00000000..c3510883 --- /dev/null +++ b/zitadel_client/models/settings_service_get_active_identity_providers_request.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetActiveIdentityProvidersRequest(BaseModel): + """ + SettingsServiceGetActiveIdentityProvidersRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + creation_allowed: Optional[StrictBool] = Field(default=None, alias="creationAllowed") + linking_allowed: Optional[StrictBool] = Field(default=None, alias="linkingAllowed") + auto_creation: Optional[StrictBool] = Field(default=None, alias="autoCreation") + auto_linking: Optional[StrictBool] = Field(default=None, alias="autoLinking") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetActiveIdentityProvidersRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + # set to None if creation_allowed (nullable) is None + # and model_fields_set contains the field + if self.creation_allowed is None and "creation_allowed" in self.model_fields_set: + _dict['creationAllowed'] = None + + # set to None if linking_allowed (nullable) is None + # and model_fields_set contains the field + if self.linking_allowed is None and "linking_allowed" in self.model_fields_set: + _dict['linkingAllowed'] = None + + # set to None if auto_creation (nullable) is None + # and model_fields_set contains the field + if self.auto_creation is None and "auto_creation" in self.model_fields_set: + _dict['autoCreation'] = None + + # set to None if auto_linking (nullable) is None + # and model_fields_set contains the field + if self.auto_linking is None and "auto_linking" in self.model_fields_set: + _dict['autoLinking'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetActiveIdentityProvidersRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None, + "creationAllowed": obj.get("creationAllowed"), + "linkingAllowed": obj.get("linkingAllowed"), + "autoCreation": obj.get("autoCreation"), + "autoLinking": obj.get("autoLinking") + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_get_branding_settings_request.py b/zitadel_client/models/settings_service_get_branding_settings_request.py new file mode 100644 index 00000000..c0f7d01e --- /dev/null +++ b/zitadel_client/models/settings_service_get_branding_settings_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetBrandingSettingsRequest(BaseModel): + """ + SettingsServiceGetBrandingSettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetBrandingSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetBrandingSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + 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..2214eefa 100644 --- a/zitadel_client/models/settings_service_get_branding_settings_response.py +++ b/zitadel_client/models/settings_service_get_branding_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_branding_settings import SettingsServiceBrandingSettings from zitadel_client.models.settings_service_details import SettingsServiceDetails from typing import Optional, Set diff --git a/zitadel_client/models/settings_service_get_domain_settings_request.py b/zitadel_client/models/settings_service_get_domain_settings_request.py new file mode 100644 index 00000000..31c9b603 --- /dev/null +++ b/zitadel_client/models/settings_service_get_domain_settings_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetDomainSettingsRequest(BaseModel): + """ + SettingsServiceGetDomainSettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetDomainSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetDomainSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + 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..933e3ef9 100644 --- a/zitadel_client/models/settings_service_get_domain_settings_response.py +++ b/zitadel_client/models/settings_service_get_domain_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_domain_settings import SettingsServiceDomainSettings from typing import Optional, Set 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..c46559d6 100644 --- a/zitadel_client/models/settings_service_get_general_settings_response.py +++ b/zitadel_client/models/settings_service_get_general_settings_response.py @@ -26,8 +26,8 @@ class SettingsServiceGetGeneralSettingsResponse(BaseModel): """ SettingsServiceGetGeneralSettingsResponse """ # noqa: E501 - 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") + default_org_id: Optional[StrictStr] = Field(default=None, alias="defaultOrgId") + default_language: Optional[StrictStr] = Field(default=None, alias="defaultLanguage") supported_languages: Optional[List[StrictStr]] = Field(default=None, alias="supportedLanguages") model_config = ConfigDict( diff --git a/zitadel_client/models/settings_service_get_legal_and_support_settings_request.py b/zitadel_client/models/settings_service_get_legal_and_support_settings_request.py new file mode 100644 index 00000000..b3711ed8 --- /dev/null +++ b/zitadel_client/models/settings_service_get_legal_and_support_settings_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetLegalAndSupportSettingsRequest(BaseModel): + """ + SettingsServiceGetLegalAndSupportSettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetLegalAndSupportSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetLegalAndSupportSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + 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..5763e93c 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 @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_legal_and_support_settings import SettingsServiceLegalAndSupportSettings from typing import Optional, Set diff --git a/zitadel_client/models/settings_service_get_lockout_settings_request.py b/zitadel_client/models/settings_service_get_lockout_settings_request.py new file mode 100644 index 00000000..faa64c87 --- /dev/null +++ b/zitadel_client/models/settings_service_get_lockout_settings_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetLockoutSettingsRequest(BaseModel): + """ + SettingsServiceGetLockoutSettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetLockoutSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetLockoutSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + 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..0c005835 100644 --- a/zitadel_client/models/settings_service_get_lockout_settings_response.py +++ b/zitadel_client/models/settings_service_get_lockout_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_lockout_settings import SettingsServiceLockoutSettings from typing import Optional, Set diff --git a/zitadel_client/models/settings_service_get_login_settings_request.py b/zitadel_client/models/settings_service_get_login_settings_request.py new file mode 100644 index 00000000..6490d4d3 --- /dev/null +++ b/zitadel_client/models/settings_service_get_login_settings_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetLoginSettingsRequest(BaseModel): + """ + SettingsServiceGetLoginSettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetLoginSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetLoginSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + 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..d00735bc 100644 --- a/zitadel_client/models/settings_service_get_login_settings_response.py +++ b/zitadel_client/models/settings_service_get_login_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_login_settings import SettingsServiceLoginSettings from typing import Optional, Set diff --git a/zitadel_client/models/settings_service_get_password_complexity_settings_request.py b/zitadel_client/models/settings_service_get_password_complexity_settings_request.py new file mode 100644 index 00000000..1e84ec39 --- /dev/null +++ b/zitadel_client/models/settings_service_get_password_complexity_settings_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetPasswordComplexitySettingsRequest(BaseModel): + """ + SettingsServiceGetPasswordComplexitySettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetPasswordComplexitySettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetPasswordComplexitySettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + 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..3ac38ca8 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 @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_password_complexity_settings import SettingsServicePasswordComplexitySettings from typing import Optional, Set diff --git a/zitadel_client/models/settings_service_get_password_expiry_settings_request.py b/zitadel_client/models/settings_service_get_password_expiry_settings_request.py new file mode 100644 index 00000000..f14305df --- /dev/null +++ b/zitadel_client/models/settings_service_get_password_expiry_settings_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetPasswordExpirySettingsRequest(BaseModel): + """ + SettingsServiceGetPasswordExpirySettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetPasswordExpirySettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetPasswordExpirySettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + 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..1d7f3815 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 @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_password_expiry_settings import SettingsServicePasswordExpirySettings from typing import Optional, Set 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..a0ff72d1 100644 --- a/zitadel_client/models/settings_service_get_security_settings_response.py +++ b/zitadel_client/models/settings_service_get_security_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_security_settings import SettingsServiceSecuritySettings from typing import Optional, Set diff --git a/zitadel_client/models/settings_service_identity_provider.py b/zitadel_client/models/settings_service_identity_provider.py index 06609aee..6ae245f3 100644 --- a/zitadel_client/models/settings_service_identity_provider.py +++ b/zitadel_client/models/settings_service_identity_provider.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_identity_provider_type import SettingsServiceIdentityProviderType from zitadel_client.models.settings_service_options import SettingsServiceOptions from typing import Optional, Set @@ -30,7 +30,7 @@ class SettingsServiceIdentityProvider(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None - type: Optional[SettingsServiceIdentityProviderType] = SettingsServiceIdentityProviderType.IDENTITY_PROVIDER_TYPE_UNSPECIFIED + type: Optional[SettingsServiceIdentityProviderType] = None options: Optional[SettingsServiceOptions] = None model_config = ConfigDict( @@ -89,7 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "name": obj.get("name"), - "type": obj.get("type") if obj.get("type") is not None else SettingsServiceIdentityProviderType.IDENTITY_PROVIDER_TYPE_UNSPECIFIED, + "type": obj.get("type"), "options": SettingsServiceOptions.from_dict(obj["options"]) if obj.get("options") is not None else None }) 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..2754d667 100644 --- a/zitadel_client/models/settings_service_legal_and_support_settings.py +++ b/zitadel_client/models/settings_service_legal_and_support_settings.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType from typing import Optional, Set from typing_extensions import Self @@ -30,11 +30,11 @@ class SettingsServiceLegalAndSupportSettings(BaseModel): tos_link: Optional[StrictStr] = Field(default=None, alias="tosLink") privacy_policy_link: Optional[StrictStr] = Field(default=None, alias="privacyPolicyLink") help_link: Optional[StrictStr] = Field(default=None, alias="helpLink") - support_email: Optional[StrictStr] = Field(default=None, description="help / support email address.", alias="supportEmail") - resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") - 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") + support_email: Optional[StrictStr] = Field(default=None, alias="supportEmail") + resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + docs_link: Optional[StrictStr] = Field(default=None, alias="docsLink") + custom_link: Optional[StrictStr] = Field(default=None, alias="customLink") + custom_link_text: Optional[StrictStr] = Field(default=None, alias="customLinkText") model_config = ConfigDict( populate_by_name=True, @@ -91,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "privacyPolicyLink": obj.get("privacyPolicyLink"), "helpLink": obj.get("helpLink"), "supportEmail": obj.get("supportEmail"), - "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, + "resourceOwnerType": obj.get("resourceOwnerType"), "docsLink": obj.get("docsLink"), "customLink": obj.get("customLink"), "customLinkText": obj.get("customLinkText") diff --git a/zitadel_client/models/settings_service_list_details.py b/zitadel_client/models/settings_service_list_details.py index 467697fb..e303dff2 100644 --- a/zitadel_client/models/settings_service_list_details.py +++ b/zitadel_client/models/settings_service_list_details.py @@ -18,8 +18,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,9 @@ class SettingsServiceListDetails(BaseModel): """ SettingsServiceListDetails """ # noqa: E501 - 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") + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") model_config = ConfigDict( populate_by_name=True, @@ -70,6 +70,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/settings_service_lockout_settings.py b/zitadel_client/models/settings_service_lockout_settings.py index 85be74f6..f63303ee 100644 --- a/zitadel_client/models/settings_service_lockout_settings.py +++ b/zitadel_client/models/settings_service_lockout_settings.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,9 @@ class SettingsServiceLockoutSettings(BaseModel): """ SettingsServiceLockoutSettings """ # noqa: E501 - 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") + max_password_attempts: Optional[Any] = Field(default=None, alias="maxPasswordAttempts") + resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + max_otp_attempts: Optional[Any] = Field(default=None, alias="maxOtpAttempts") model_config = ConfigDict( populate_by_name=True, @@ -70,6 +70,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if max_password_attempts (nullable) is None + # and model_fields_set contains the field + if self.max_password_attempts is None and "max_password_attempts" in self.model_fields_set: + _dict['maxPasswordAttempts'] = None + + # set to None if max_otp_attempts (nullable) is None + # and model_fields_set contains the field + if self.max_otp_attempts is None and "max_otp_attempts" in self.model_fields_set: + _dict['maxOtpAttempts'] = None + return _dict @classmethod @@ -83,7 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "maxPasswordAttempts": obj.get("maxPasswordAttempts"), - "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, + "resourceOwnerType": obj.get("resourceOwnerType"), "maxOtpAttempts": obj.get("maxOtpAttempts") }) return _obj diff --git a/zitadel_client/models/settings_service_login_settings.py b/zitadel_client/models/settings_service_login_settings.py index 66208aa0..61346786 100644 --- a/zitadel_client/models/settings_service_login_settings.py +++ b/zitadel_client/models/settings_service_login_settings.py @@ -30,26 +30,26 @@ class SettingsServiceLoginSettings(BaseModel): """ SettingsServiceLoginSettings """ # noqa: E501 - allow_username_password: Optional[StrictBool] = Field(default=None, description="defines if a user is allowed to log in with username and password", alias="allowUsernamePassword") - allow_register: Optional[StrictBool] = Field(default=None, description="defines if a person is allowed to register a user on this organization", alias="allowRegister") - allow_external_idp: Optional[StrictBool] = Field(default=None, description="defines if a user is allowed to add a defined identity provider. E.g. Google auth", alias="allowExternalIdp") - force_mfa: Optional[StrictBool] = Field(default=None, description="defines if a user MUST use a multi-factor to log in", alias="forceMfa") - passkeys_type: Optional[SettingsServicePasskeysType] = Field(default=SettingsServicePasskeysType.PASSKEYS_TYPE_NOT_ALLOWED, alias="passkeysType") - hide_password_reset: Optional[StrictBool] = Field(default=None, description="defines if password reset link should be shown in the login screen", alias="hidePasswordReset") - ignore_unknown_usernames: Optional[StrictBool] = Field(default=None, description="defines if unknown username on login screen directly returns an error or always displays the password screen", alias="ignoreUnknownUsernames") - default_redirect_uri: Optional[StrictStr] = Field(default=None, description="defines where the user will be redirected to if the login is started without app context (e.g. from mail)", alias="defaultRedirectUri") - password_check_lifetime: Optional[StrictStr] = Field(default=None, description="Defines after how much time the user has to re-authenticate with the password.", alias="passwordCheckLifetime") - external_login_check_lifetime: Optional[StrictStr] = Field(default=None, description="Defines after how much time the user has to re-authenticate with an external provider.", alias="externalLoginCheckLifetime") - mfa_init_skip_lifetime: Optional[StrictStr] = Field(default=None, description="Defines after how much time the mfa prompt will be shown again.", alias="mfaInitSkipLifetime") - second_factor_check_lifetime: Optional[StrictStr] = Field(default=None, description="Defines after how long the second factor check is valid.", alias="secondFactorCheckLifetime") - multi_factor_check_lifetime: Optional[StrictStr] = Field(default=None, description="Defines how long the multi-factor check is valid.", alias="multiFactorCheckLifetime") + allow_username_password: Optional[StrictBool] = Field(default=None, alias="allowUsernamePassword") + allow_register: Optional[StrictBool] = Field(default=None, alias="allowRegister") + allow_external_idp: Optional[StrictBool] = Field(default=None, alias="allowExternalIdp") + force_mfa: Optional[StrictBool] = Field(default=None, alias="forceMfa") + passkeys_type: Optional[SettingsServicePasskeysType] = Field(default=None, alias="passkeysType") + hide_password_reset: Optional[StrictBool] = Field(default=None, alias="hidePasswordReset") + ignore_unknown_usernames: Optional[StrictBool] = Field(default=None, alias="ignoreUnknownUsernames") + default_redirect_uri: Optional[StrictStr] = Field(default=None, alias="defaultRedirectUri") + password_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="passwordCheckLifetime") + external_login_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="externalLoginCheckLifetime") + mfa_init_skip_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="mfaInitSkipLifetime") + second_factor_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="secondFactorCheckLifetime") + multi_factor_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="multiFactorCheckLifetime") second_factors: Optional[List[SettingsServiceSecondFactorType]] = Field(default=None, alias="secondFactors") multi_factors: Optional[List[SettingsServiceMultiFactorType]] = Field(default=None, alias="multiFactors") allow_domain_discovery: Optional[StrictBool] = Field(default=None, description="If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organization on success.", alias="allowDomainDiscovery") - disable_login_with_email: Optional[StrictBool] = Field(default=None, description="defines if the user can additionally (to the login name) be identified by their verified email address", alias="disableLoginWithEmail") - 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") + disable_login_with_email: Optional[StrictBool] = Field(default=None, alias="disableLoginWithEmail") + disable_login_with_phone: Optional[StrictBool] = Field(default=None, alias="disableLoginWithPhone") + resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + force_mfa_local_only: Optional[StrictBool] = Field(default=None, alias="forceMfaLocalOnly") model_config = ConfigDict( populate_by_name=True, @@ -106,7 +106,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "allowRegister": obj.get("allowRegister"), "allowExternalIdp": obj.get("allowExternalIdp"), "forceMfa": obj.get("forceMfa"), - "passkeysType": obj.get("passkeysType") if obj.get("passkeysType") is not None else SettingsServicePasskeysType.PASSKEYS_TYPE_NOT_ALLOWED, + "passkeysType": obj.get("passkeysType"), "hidePasswordReset": obj.get("hidePasswordReset"), "ignoreUnknownUsernames": obj.get("ignoreUnknownUsernames"), "defaultRedirectUri": obj.get("defaultRedirectUri"), @@ -120,7 +120,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "allowDomainDiscovery": obj.get("allowDomainDiscovery"), "disableLoginWithEmail": obj.get("disableLoginWithEmail"), "disableLoginWithPhone": obj.get("disableLoginWithPhone"), - "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, + "resourceOwnerType": obj.get("resourceOwnerType"), "forceMfaLocalOnly": obj.get("forceMfaLocalOnly") }) return _obj diff --git a/zitadel_client/models/settings_service_options.py b/zitadel_client/models/settings_service_options.py index 7ac77c08..ac94c420 100644 --- a/zitadel_client/models/settings_service_options.py +++ b/zitadel_client/models/settings_service_options.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_auto_linking_option import SettingsServiceAutoLinkingOption from typing import Optional, Set from typing_extensions import Self @@ -27,11 +27,11 @@ class SettingsServiceOptions(BaseModel): """ SettingsServiceOptions """ # noqa: E501 - is_linking_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to link an existing ZITADEL user with an external account.", alias="isLinkingAllowed") - is_creation_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to create a new account in ZITADEL when using an external account.", alias="isCreationAllowed") - 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") + is_linking_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to link an existing ZITADEL user with an external account.", alias="isLinkingAllowed") + is_creation_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to create a new account in ZITADEL when using an external account.", alias="isCreationAllowed") + 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=None, alias="autoLinking") model_config = ConfigDict( populate_by_name=True, @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isCreationAllowed": obj.get("isCreationAllowed"), "isAutoCreation": obj.get("isAutoCreation"), "isAutoUpdate": obj.get("isAutoUpdate"), - "autoLinking": obj.get("autoLinking") if obj.get("autoLinking") is not None else SettingsServiceAutoLinkingOption.AUTO_LINKING_OPTION_UNSPECIFIED + "autoLinking": obj.get("autoLinking") }) 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..117933b2 100644 --- a/zitadel_client/models/settings_service_password_complexity_settings.py +++ b/zitadel_client/models/settings_service_password_complexity_settings.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType from typing import Optional, Set from typing_extensions import Self @@ -27,12 +27,12 @@ class SettingsServicePasswordComplexitySettings(BaseModel): """ SettingsServicePasswordComplexitySettings """ # noqa: E501 - min_length: Optional[StrictStr] = Field(default=None, description="Defines the minimum length of a password.", alias="minLength") - requires_uppercase: Optional[StrictBool] = Field(default=None, description="defines if the password MUST contain an upper case letter", alias="requiresUppercase") - requires_lowercase: Optional[StrictBool] = Field(default=None, description="defines if the password MUST contain a lowercase letter", alias="requiresLowercase") - 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") + min_length: Optional[Any] = Field(default=None, alias="minLength") + requires_uppercase: Optional[StrictBool] = Field(default=None, alias="requiresUppercase") + requires_lowercase: Optional[StrictBool] = Field(default=None, alias="requiresLowercase") + requires_number: Optional[StrictBool] = Field(default=None, alias="requiresNumber") + requires_symbol: Optional[StrictBool] = Field(default=None, alias="requiresSymbol") + resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") model_config = ConfigDict( populate_by_name=True, @@ -73,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if min_length (nullable) is None + # and model_fields_set contains the field + if self.min_length is None and "min_length" in self.model_fields_set: + _dict['minLength'] = None + return _dict @classmethod @@ -90,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "requiresLowercase": obj.get("requiresLowercase"), "requiresNumber": obj.get("requiresNumber"), "requiresSymbol": obj.get("requiresSymbol"), - "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED + "resourceOwnerType": obj.get("resourceOwnerType") }) 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..aa06ea8f 100644 --- a/zitadel_client/models/settings_service_password_expiry_settings.py +++ b/zitadel_client/models/settings_service_password_expiry_settings.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,9 @@ class SettingsServicePasswordExpirySettings(BaseModel): """ SettingsServicePasswordExpirySettings """ # noqa: E501 - 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") + max_age_days: Optional[Any] = 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[Any] = 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=None, alias="resourceOwnerType") model_config = ConfigDict( populate_by_name=True, @@ -70,6 +70,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if max_age_days (nullable) is None + # and model_fields_set contains the field + if self.max_age_days is None and "max_age_days" in self.model_fields_set: + _dict['maxAgeDays'] = None + + # set to None if expire_warn_days (nullable) is None + # and model_fields_set contains the field + if self.expire_warn_days is None and "expire_warn_days" in self.model_fields_set: + _dict['expireWarnDays'] = None + return _dict @classmethod @@ -84,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "maxAgeDays": obj.get("maxAgeDays"), "expireWarnDays": obj.get("expireWarnDays"), - "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED + "resourceOwnerType": obj.get("resourceOwnerType") }) return _obj diff --git a/zitadel_client/models/settings_service_request_context.py b/zitadel_client/models/settings_service_request_context.py new file mode 100644 index 00000000..0a8347eb --- /dev/null +++ b/zitadel_client/models/settings_service_request_context.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.instance import Instance +from zitadel_client.models.org_id import OrgId +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SETTINGSSERVICEREQUESTCONTEXT_ONE_OF_SCHEMAS = ["Instance", "OrgId"] + +class SettingsServiceRequestContext(BaseModel): + """ + SettingsServiceRequestContext + """ + # data type: Instance + oneof_schema_1_validator: Optional[Instance] = None + # data type: OrgId + oneof_schema_2_validator: Optional[OrgId] = None + actual_instance: Optional[Union[Instance, OrgId]] = None + one_of_schemas: Set[str] = { "Instance", "OrgId" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SettingsServiceRequestContext.model_construct() + error_messages = [] + match = 0 + # validate data type: Instance + if not isinstance(v, Instance): + error_messages.append(f"Error! Input type `{type(v)}` is not `Instance`") + else: + match += 1 + # validate data type: OrgId + if not isinstance(v, OrgId): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrgId`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SettingsServiceRequestContext with oneOf schemas: Instance, OrgId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SettingsServiceRequestContext with oneOf schemas: Instance, OrgId. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Instance + try: + instance.actual_instance = Instance.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OrgId + try: + instance.actual_instance = OrgId.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SettingsServiceRequestContext with oneOf schemas: Instance, OrgId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SettingsServiceRequestContext with oneOf schemas: Instance, OrgId. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Instance, OrgId]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/settings_service_security_settings.py b/zitadel_client/models/settings_service_security_settings.py index c6130792..c627ecfb 100644 --- a/zitadel_client/models/settings_service_security_settings.py +++ b/zitadel_client/models/settings_service_security_settings.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_embedded_iframe_settings import SettingsServiceEmbeddedIframeSettings from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class SettingsServiceSecuritySettings(BaseModel): SettingsServiceSecuritySettings """ # 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") + enable_impersonation: Optional[StrictBool] = Field(default=None, alias="enableImpersonation") model_config = ConfigDict( populate_by_name=True, 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..26d746f5 100644 --- a/zitadel_client/models/settings_service_set_security_settings_request.py +++ b/zitadel_client/models/settings_service_set_security_settings_request.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_embedded_iframe_settings import SettingsServiceEmbeddedIframeSettings from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class SettingsServiceSetSecuritySettingsRequest(BaseModel): SettingsServiceSetSecuritySettingsRequest """ # 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") + enable_impersonation: Optional[StrictBool] = Field(default=None, alias="enableImpersonation") model_config = ConfigDict( populate_by_name=True, 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..8da0fae9 100644 --- a/zitadel_client/models/settings_service_set_security_settings_response.py +++ b/zitadel_client/models/settings_service_set_security_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/settings_service_theme.py b/zitadel_client/models/settings_service_theme.py index af0bb065..003ba08a 100644 --- a/zitadel_client/models/settings_service_theme.py +++ b/zitadel_client/models/settings_service_theme.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,10 +28,10 @@ class SettingsServiceTheme(BaseModel): """ # noqa: E501 primary_color: Optional[StrictStr] = Field(default=None, description="hex value for primary color", alias="primaryColor") background_color: Optional[StrictStr] = Field(default=None, description="hex value for background color", alias="backgroundColor") - warn_color: Optional[StrictStr] = Field(default=None, description="hex value for warn color", alias="warnColor") + warn_color: Optional[StrictStr] = Field(default=None, description="hex value for warning color", alias="warnColor") 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") + logo_url: Optional[StrictStr] = Field(default=None, description="url where the logo is served", alias="logoUrl") + icon_url: Optional[StrictStr] = Field(default=None, description="url where the icon is served", alias="iconUrl") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/state_query.py b/zitadel_client/models/state_query.py new file mode 100644 index 00000000..439bf482 --- /dev/null +++ b/zitadel_client/models/state_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_state_query import UserServiceStateQuery +from typing import Optional, Set +from typing_extensions import Self + +class StateQuery(BaseModel): + """ + StateQuery + """ # noqa: E501 + state_query: UserServiceStateQuery = Field(alias="stateQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StateQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of state_query + if self.state_query: + _dict['stateQuery'] = self.state_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StateQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "stateQuery": UserServiceStateQuery.from_dict(obj["stateQuery"]) if obj.get("stateQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_delete_target_response.py b/zitadel_client/models/state_query1.py similarity index 75% rename from zitadel_client/models/action_service_beta_delete_target_response.py rename to zitadel_client/models/state_query1.py index d25a2fad..56ba3084 100644 --- a/zitadel_client/models/action_service_beta_delete_target_response.py +++ b/zitadel_client/models/state_query1.py @@ -17,17 +17,17 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.organization_service_organization_state_query import OrganizationServiceOrganizationStateQuery from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaDeleteTargetResponse(BaseModel): +class StateQuery1(BaseModel): """ - ActionServiceBetaDeleteTargetResponse + StateQuery1 """ # 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") + state_query: OrganizationServiceOrganizationStateQuery = Field(alias="stateQuery") model_config = ConfigDict( populate_by_name=True, @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaDeleteTargetResponse from a JSON string""" + """Create an instance of StateQuery1 from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -68,11 +68,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of state_query + if self.state_query: + _dict['stateQuery'] = self.state_query.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaDeleteTargetResponse from a dict""" + """Create an instance of StateQuery1 from a dict""" if obj is None: return None @@ -80,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "deletionDate": obj.get("deletionDate") + "stateQuery": OrganizationServiceOrganizationStateQuery.from_dict(obj["stateQuery"]) if obj.get("stateQuery") is not None else None }) return _obj diff --git a/zitadel_client/models/state_query2.py b/zitadel_client/models/state_query2.py new file mode 100644 index 00000000..5350b08b --- /dev/null +++ b/zitadel_client/models/state_query2.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_state_query import BetaUserServiceStateQuery +from typing import Optional, Set +from typing_extensions import Self + +class StateQuery2(BaseModel): + """ + StateQuery2 + """ # noqa: E501 + state_query: BetaUserServiceStateQuery = Field(alias="stateQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StateQuery2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of state_query + if self.state_query: + _dict['stateQuery'] = self.state_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StateQuery2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "stateQuery": BetaUserServiceStateQuery.from_dict(obj["stateQuery"]) if obj.get("stateQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/target_filter.py b/zitadel_client/models/target_filter.py new file mode 100644 index 00000000..a1d17743 --- /dev/null +++ b/zitadel_client/models/target_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_action_service_target_filter import BetaActionServiceTargetFilter +from typing import Optional, Set +from typing_extensions import Self + +class TargetFilter(BaseModel): + """ + TargetFilter + """ # noqa: E501 + target_filter: BetaActionServiceTargetFilter = Field(alias="targetFilter") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TargetFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of target_filter + if self.target_filter: + _dict['targetFilter'] = self.target_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TargetFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetFilter": BetaActionServiceTargetFilter.from_dict(obj["targetFilter"]) if obj.get("targetFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/session_service_request_challenges_otp_email.py b/zitadel_client/models/target_name_filter.py similarity index 73% rename from zitadel_client/models/session_service_request_challenges_otp_email.py rename to zitadel_client/models/target_name_filter.py index d7bf15a5..e377a877 100644 --- a/zitadel_client/models/session_service_request_challenges_otp_email.py +++ b/zitadel_client/models/target_name_filter.py @@ -18,17 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.session_service_otp_email_send_code import SessionServiceOTPEmailSendCode +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_action_service_target_name_filter import BetaActionServiceTargetNameFilter from typing import Optional, Set from typing_extensions import Self -class SessionServiceRequestChallengesOTPEmail(BaseModel): +class TargetNameFilter(BaseModel): """ - SessionServiceRequestChallengesOTPEmail + TargetNameFilter """ # noqa: E501 - send_code: Optional[SessionServiceOTPEmailSendCode] = Field(default=None, alias="sendCode") - return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + target_name_filter: BetaActionServiceTargetNameFilter = Field(alias="targetNameFilter") model_config = ConfigDict( populate_by_name=True, @@ -48,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceRequestChallengesOTPEmail from a JSON string""" + """Create an instance of TargetNameFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -69,11 +68,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of target_name_filter + if self.target_name_filter: + _dict['targetNameFilter'] = self.target_name_filter.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceRequestChallengesOTPEmail from a dict""" + """Create an instance of TargetNameFilter from a dict""" if obj is None: return None @@ -81,8 +83,7 @@ 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") + "targetNameFilter": BetaActionServiceTargetNameFilter.from_dict(obj["targetNameFilter"]) if obj.get("targetNameFilter") is not None else None }) return _obj diff --git a/zitadel_client/models/tenant_id.py b/zitadel_client/models/tenant_id.py new file mode 100644 index 00000000..def731f4 --- /dev/null +++ b/zitadel_client/models/tenant_id.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TenantId(BaseModel): + """ + TenantId + """ # noqa: E501 + tenant_id: StrictStr = Field(alias="tenantId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TenantId from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TenantId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tenantId": obj.get("tenantId") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_set_execution_response.py b/zitadel_client/models/tenant_type.py similarity index 81% rename from zitadel_client/models/action_service_beta_set_execution_response.py rename to zitadel_client/models/tenant_type.py index 31850e3e..bddf33c3 100644 --- a/zitadel_client/models/action_service_beta_set_execution_response.py +++ b/zitadel_client/models/tenant_type.py @@ -17,17 +17,17 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.identity_provider_service_azure_ad_tenant_type import IdentityProviderServiceAzureADTenantType from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaSetExecutionResponse(BaseModel): +class TenantType(BaseModel): """ - ActionServiceBetaSetExecutionResponse + TenantType """ # noqa: E501 - set_date: Optional[datetime] = Field(default=None, description="The timestamp of the execution set.", alias="setDate") + tenant_type: IdentityProviderServiceAzureADTenantType = Field(alias="tenantType") model_config = ConfigDict( populate_by_name=True, @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaSetExecutionResponse from a JSON string""" + """Create an instance of TenantType from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaSetExecutionResponse from a dict""" + """Create an instance of TenantType from a dict""" if obj is None: return None @@ -80,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "setDate": obj.get("setDate") + "tenantType": obj.get("tenantType") }) return _obj diff --git a/zitadel_client/models/type_query.py b/zitadel_client/models/type_query.py new file mode 100644 index 00000000..23998352 --- /dev/null +++ b/zitadel_client/models/type_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_type_query import UserServiceTypeQuery +from typing import Optional, Set +from typing_extensions import Self + +class TypeQuery(BaseModel): + """ + TypeQuery + """ # noqa: E501 + type_query: UserServiceTypeQuery = Field(alias="typeQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TypeQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of type_query + if self.type_query: + _dict['typeQuery'] = self.type_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TypeQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "typeQuery": UserServiceTypeQuery.from_dict(obj["typeQuery"]) if obj.get("typeQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/type_query1.py b/zitadel_client/models/type_query1.py new file mode 100644 index 00000000..2c725dc9 --- /dev/null +++ b/zitadel_client/models/type_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_type_query import BetaUserServiceTypeQuery +from typing import Optional, Set +from typing_extensions import Self + +class TypeQuery1(BaseModel): + """ + TypeQuery1 + """ # noqa: E501 + type_query: BetaUserServiceTypeQuery = Field(alias="typeQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TypeQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of type_query + if self.type_query: + _dict['typeQuery'] = self.type_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TypeQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "typeQuery": BetaUserServiceTypeQuery.from_dict(obj["typeQuery"]) if obj.get("typeQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/u2f.py b/zitadel_client/models/u2f.py new file mode 100644 index 00000000..1c9a4a89 --- /dev/null +++ b/zitadel_client/models/u2f.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_auth_factor_u2_f import UserServiceAuthFactorU2F +from typing import Optional, Set +from typing_extensions import Self + +class U2f(BaseModel): + """ + U2f + """ # noqa: E501 + u2f: UserServiceAuthFactorU2F + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of U2f from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of u2f + if self.u2f: + _dict['u2f'] = self.u2f.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of U2f from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "u2f": UserServiceAuthFactorU2F.from_dict(obj["u2f"]) if obj.get("u2f") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/urls.py b/zitadel_client/models/urls.py new file mode 100644 index 00000000..b82a15e4 --- /dev/null +++ b/zitadel_client/models/urls.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_redirect_urls import UserServiceRedirectURLs +from typing import Optional, Set +from typing_extensions import Self + +class Urls(BaseModel): + """ + Urls + """ # noqa: E501 + urls: UserServiceRedirectURLs + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Urls from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of urls + if self.urls: + _dict['urls'] = self.urls.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Urls from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "urls": UserServiceRedirectURLs.from_dict(obj["urls"]) if obj.get("urls") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/urls1.py b/zitadel_client/models/urls1.py new file mode 100644 index 00000000..236b93bc --- /dev/null +++ b/zitadel_client/models/urls1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_redirect_urls import BetaUserServiceRedirectURLs +from typing import Optional, Set +from typing_extensions import Self + +class Urls1(BaseModel): + """ + Urls1 + """ # noqa: E501 + urls: BetaUserServiceRedirectURLs + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Urls1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of urls + if self.urls: + _dict['urls'] = self.urls.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Urls1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "urls": BetaUserServiceRedirectURLs.from_dict(obj["urls"]) if obj.get("urls") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_agent_query.py b/zitadel_client/models/user_agent_query.py new file mode 100644 index 00000000..717cb944 --- /dev/null +++ b/zitadel_client/models/user_agent_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.session_service_user_agent_query import SessionServiceUserAgentQuery +from typing import Optional, Set +from typing_extensions import Self + +class UserAgentQuery(BaseModel): + """ + UserAgentQuery + """ # noqa: E501 + user_agent_query: SessionServiceUserAgentQuery = Field(alias="userAgentQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserAgentQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user_agent_query + if self.user_agent_query: + _dict['userAgentQuery'] = self.user_agent_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserAgentQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userAgentQuery": SessionServiceUserAgentQuery.from_dict(obj["userAgentQuery"]) if obj.get("userAgentQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_id.py b/zitadel_client/models/user_id.py new file mode 100644 index 00000000..6b239829 --- /dev/null +++ b/zitadel_client/models/user_id.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UserId(BaseModel): + """ + UserId + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserId from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_id_query.py b/zitadel_client/models/user_id_query.py new file mode 100644 index 00000000..eddcc846 --- /dev/null +++ b/zitadel_client/models/user_id_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_session_service_user_id_query import BetaSessionServiceUserIDQuery +from typing import Optional, Set +from typing_extensions import Self + +class UserIdQuery(BaseModel): + """ + UserIdQuery + """ # noqa: E501 + user_id_query: BetaSessionServiceUserIDQuery = Field(alias="userIdQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserIdQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user_id_query + if self.user_id_query: + _dict['userIdQuery'] = self.user_id_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserIdQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userIdQuery": BetaSessionServiceUserIDQuery.from_dict(obj["userIdQuery"]) if obj.get("userIdQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_id_query1.py b/zitadel_client/models/user_id_query1.py new file mode 100644 index 00000000..fe7a11cd --- /dev/null +++ b/zitadel_client/models/user_id_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.session_service_user_id_query import SessionServiceUserIDQuery +from typing import Optional, Set +from typing_extensions import Self + +class UserIdQuery1(BaseModel): + """ + UserIdQuery1 + """ # noqa: E501 + user_id_query: SessionServiceUserIDQuery = Field(alias="userIdQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserIdQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user_id_query + if self.user_id_query: + _dict['userIdQuery'] = self.user_id_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserIdQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userIdQuery": SessionServiceUserIDQuery.from_dict(obj["userIdQuery"]) if obj.get("userIdQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_name_query.py b/zitadel_client/models/user_name_query.py new file mode 100644 index 00000000..8044d4f8 --- /dev/null +++ b/zitadel_client/models/user_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.user_service_user_name_query import UserServiceUserNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class UserNameQuery(BaseModel): + """ + UserNameQuery + """ # noqa: E501 + user_name_query: UserServiceUserNameQuery = Field(alias="userNameQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user_name_query + if self.user_name_query: + _dict['userNameQuery'] = self.user_name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userNameQuery": UserServiceUserNameQuery.from_dict(obj["userNameQuery"]) if obj.get("userNameQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_name_query1.py b/zitadel_client/models/user_name_query1.py new file mode 100644 index 00000000..eb2efd2d --- /dev/null +++ b/zitadel_client/models/user_name_query1.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from zitadel_client.models.beta_user_service_user_name_query import BetaUserServiceUserNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class UserNameQuery1(BaseModel): + """ + UserNameQuery1 + """ # noqa: E501 + user_name_query: BetaUserServiceUserNameQuery = Field(alias="userNameQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserNameQuery1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user_name_query + if self.user_name_query: + _dict['userNameQuery'] = self.user_name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserNameQuery1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userNameQuery": BetaUserServiceUserNameQuery.from_dict(obj["userNameQuery"]) if obj.get("userNameQuery") is not None else None + }) + 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..3c6dd306 100644 --- a/zitadel_client/models/user_service_add_human_user_request.py +++ b/zitadel_client/models/user_service_add_human_user_request.py @@ -13,103 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.hashed_password import HashedPassword +from zitadel_client.models.password import Password +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.user_service_hashed_password import UserServiceHashedPassword -from zitadel_client.models.user_service_idp_link import UserServiceIDPLink -from zitadel_client.models.user_service_organization import UserServiceOrganization -from zitadel_client.models.user_service_password import UserServicePassword -from zitadel_client.models.user_service_set_human_email import UserServiceSetHumanEmail -from zitadel_client.models.user_service_set_human_phone import UserServiceSetHumanPhone -from zitadel_client.models.user_service_set_human_profile import UserServiceSetHumanProfile -from zitadel_client.models.user_service_set_metadata_entry import UserServiceSetMetadataEntry -from typing import Optional, Set -from typing_extensions import Self +USERSERVICEADDHUMANUSERREQUEST_ONE_OF_SCHEMAS = ["HashedPassword", "Password"] class UserServiceAddHumanUserRequest(BaseModel): """ UserServiceAddHumanUserRequest - """ # noqa: E501 - user_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="optionally set your own id unique for the user.", alias="userId") - username: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="optionally set a unique username, if none is provided the email will be used.") - organization: Optional[UserServiceOrganization] = None - profile: UserServiceSetHumanProfile - email: UserServiceSetHumanEmail - phone: Optional[UserServiceSetHumanPhone] = None - metadata: Optional[List[UserServiceSetMetadataEntry]] = None - password: Optional[UserServicePassword] = None - 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") + """ + # data type: HashedPassword + oneof_schema_1_validator: Optional[HashedPassword] = None + # data type: Password + oneof_schema_2_validator: Optional[Password] = None + actual_instance: Optional[Union[HashedPassword, Password]] = None + one_of_schemas: Set[str] = { "HashedPassword", "Password" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceAddHumanUserRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: HashedPassword + if not isinstance(v, HashedPassword): + error_messages.append(f"Error! Input type `{type(v)}` is not `HashedPassword`") + else: + match += 1 + # validate data type: Password + if not isinstance(v, Password): + error_messages.append(f"Error! Input type `{type(v)}` is not `Password`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceAddHumanUserRequest with oneOf schemas: HashedPassword, Password. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceAddHumanUserRequest with oneOf schemas: HashedPassword, Password. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceAddHumanUserRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceAddHumanUserRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into HashedPassword + try: + instance.actual_instance = HashedPassword.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Password + try: + instance.actual_instance = Password.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceAddHumanUserRequest with oneOf schemas: HashedPassword, Password. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceAddHumanUserRequest with oneOf schemas: HashedPassword, Password. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], HashedPassword, Password]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - 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") - }) - return _obj + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) 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..9416b30c 100644 --- a/zitadel_client/models/user_service_add_human_user_response.py +++ b/zitadel_client/models/user_service_add_human_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -74,6 +74,16 @@ 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() + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + return _dict @classmethod 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..7c528376 100644 --- a/zitadel_client/models/user_service_add_idp_link_request.py +++ b/zitadel_client/models/user_service_add_idp_link_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_idp_link import UserServiceIDPLink from typing import Optional, Set from typing_extensions import Self @@ -27,6 +27,7 @@ class UserServiceAddIDPLinkRequest(BaseModel): """ UserServiceAddIDPLinkRequest """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") idp_link: Optional[UserServiceIDPLink] = Field(default=None, alias="idpLink") model_config = ConfigDict( @@ -83,6 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "idpLink": UserServiceIDPLink.from_dict(obj["idpLink"]) if obj.get("idpLink") is not None else None }) 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..1ddc0ea7 100644 --- a/zitadel_client/models/user_service_add_idp_link_response.py +++ b/zitadel_client/models/user_service_add_idp_link_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_add_otp_email_request.py b/zitadel_client/models/user_service_add_otp_email_request.py new file mode 100644 index 00000000..6142b13b --- /dev/null +++ b/zitadel_client/models/user_service_add_otp_email_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceAddOTPEmailRequest(BaseModel): + """ + UserServiceAddOTPEmailRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceAddOTPEmailRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceAddOTPEmailRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..f651f1e4 100644 --- a/zitadel_client/models/user_service_add_otp_email_response.py +++ b/zitadel_client/models/user_service_add_otp_email_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_add_otpsms_request.py b/zitadel_client/models/user_service_add_otpsms_request.py new file mode 100644 index 00000000..144b8f85 --- /dev/null +++ b/zitadel_client/models/user_service_add_otpsms_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceAddOTPSMSRequest(BaseModel): + """ + UserServiceAddOTPSMSRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceAddOTPSMSRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceAddOTPSMSRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..e44ddc7f 100644 --- a/zitadel_client/models/user_service_add_otpsms_response.py +++ b/zitadel_client/models/user_service_add_otpsms_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_and_query.py b/zitadel_client/models/user_service_and_query.py index a9d4a58b..be1d2686 100644 --- a/zitadel_client/models/user_service_and_query.py +++ b/zitadel_client/models/user_service_and_query.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,7 @@ 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'") + queries: Optional[List[UserServiceSearchQuery]] = None model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_any.py b/zitadel_client/models/user_service_any.py new file mode 100644 index 00000000..3d72773b --- /dev/null +++ b/zitadel_client/models/user_service_any.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_auth_factor.py b/zitadel_client/models/user_service_auth_factor.py index 224880aa..834e3351 100644 --- a/zitadel_client/models/user_service_auth_factor.py +++ b/zitadel_client/models/user_service_auth_factor.py @@ -13,84 +13,153 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.user_service_auth_factor_state import UserServiceAuthFactorState -from zitadel_client.models.user_service_auth_factor_u2_f import UserServiceAuthFactorU2F -from typing import Optional, Set -from typing_extensions import Self +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.otp import Otp +from zitadel_client.models.otp_email import OtpEmail +from zitadel_client.models.otp_sms import OtpSms +from zitadel_client.models.u2f import U2f +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +USERSERVICEAUTHFACTOR_ONE_OF_SCHEMAS = ["Otp", "OtpEmail", "OtpSms", "U2f"] class UserServiceAuthFactor(BaseModel): """ UserServiceAuthFactor - """ # noqa: E501 - state: Optional[UserServiceAuthFactorState] = UserServiceAuthFactorState.AUTH_FACTOR_STATE_UNSPECIFIED - otp: Optional[Dict[str, Any]] = None - 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") + """ + # data type: Otp + oneof_schema_1_validator: Optional[Otp] = None + # data type: OtpEmail + oneof_schema_2_validator: Optional[OtpEmail] = None + # data type: OtpSms + oneof_schema_3_validator: Optional[OtpSms] = None + # data type: U2f + oneof_schema_4_validator: Optional[U2f] = None + actual_instance: Optional[Union[Otp, OtpEmail, OtpSms, U2f]] = None + one_of_schemas: Set[str] = { "Otp", "OtpEmail", "OtpSms", "U2f" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceAuthFactor.model_construct() + error_messages = [] + match = 0 + # validate data type: Otp + if not isinstance(v, Otp): + error_messages.append(f"Error! Input type `{type(v)}` is not `Otp`") + else: + match += 1 + # validate data type: OtpEmail + if not isinstance(v, OtpEmail): + error_messages.append(f"Error! Input type `{type(v)}` is not `OtpEmail`") + else: + match += 1 + # validate data type: OtpSms + if not isinstance(v, OtpSms): + error_messages.append(f"Error! Input type `{type(v)}` is not `OtpSms`") + else: + match += 1 + # validate data type: U2f + if not isinstance(v, U2f): + error_messages.append(f"Error! Input type `{type(v)}` is not `U2f`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceAuthFactor with oneOf schemas: Otp, OtpEmail, OtpSms, U2f. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceAuthFactor with oneOf schemas: Otp, OtpEmail, OtpSms, U2f. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceAuthFactor from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceAuthFactor from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Otp + try: + instance.actual_instance = Otp.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OtpEmail + try: + instance.actual_instance = OtpEmail.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OtpSms + try: + instance.actual_instance = OtpSms.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into U2f + try: + instance.actual_instance = U2f.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceAuthFactor with oneOf schemas: Otp, OtpEmail, OtpSms, U2f. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceAuthFactor with oneOf schemas: Otp, OtpEmail, OtpSms, U2f. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Otp, OtpEmail, OtpSms, U2f]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - 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") - }) - return _obj + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) 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..d366fa77 100644 --- a/zitadel_client/models/user_service_auth_factor_u2_f.py +++ b/zitadel_client/models/user_service_auth_factor_u2_f.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_auth_factors.py b/zitadel_client/models/user_service_auth_factors.py new file mode 100644 index 00000000..119abaa3 --- /dev/null +++ b/zitadel_client/models/user_service_auth_factors.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class UserServiceAuthFactors(str, Enum): + """ + UserServiceAuthFactors + """ + + """ + allowed enum values + """ + OTP = 'OTP' + OTP_SMS = 'OTP_SMS' + OTP_EMAIL = 'OTP_EMAIL' + U2F = 'U2F' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UserServiceAuthFactors from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/user_service_connect_error.py b/zitadel_client/models/user_service_connect_error.py new file mode 100644 index 00000000..29a4e1b2 --- /dev/null +++ b/zitadel_client/models/user_service_connect_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.user_service_any import UserServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[UserServiceAny] = None + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": UserServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + 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..5261c387 100644 --- a/zitadel_client/models/user_service_create_invite_code_request.py +++ b/zitadel_client/models/user_service_create_invite_code_request.py @@ -13,77 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.return_code6 import ReturnCode6 +from zitadel_client.models.send_code4 import SendCode4 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.user_service_send_invite_code import UserServiceSendInviteCode -from typing import Optional, Set -from typing_extensions import Self +USERSERVICECREATEINVITECODEREQUEST_ONE_OF_SCHEMAS = ["ReturnCode6", "SendCode4"] class UserServiceCreateInviteCodeRequest(BaseModel): """ UserServiceCreateInviteCodeRequest - """ # noqa: E501 - send_code: Optional[UserServiceSendInviteCode] = Field(default=None, alias="sendCode") - return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + """ + # data type: ReturnCode6 + oneof_schema_1_validator: Optional[ReturnCode6] = None + # data type: SendCode4 + oneof_schema_2_validator: Optional[SendCode4] = None + actual_instance: Optional[Union[ReturnCode6, SendCode4]] = None + one_of_schemas: Set[str] = { "ReturnCode6", "SendCode4" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceCreateInviteCodeRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: ReturnCode6 + if not isinstance(v, ReturnCode6): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode6`") + else: + match += 1 + # validate data type: SendCode4 + if not isinstance(v, SendCode4): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode4`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceCreateInviteCodeRequest with oneOf schemas: ReturnCode6, SendCode4. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceCreateInviteCodeRequest with oneOf schemas: ReturnCode6, SendCode4. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceCreateInviteCodeRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceCreateInviteCodeRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ReturnCode6 + try: + instance.actual_instance = ReturnCode6.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode4 + try: + instance.actual_instance = SendCode4.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceCreateInviteCodeRequest with oneOf schemas: ReturnCode6, SendCode4. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceCreateInviteCodeRequest with oneOf schemas: ReturnCode6, SendCode4. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ReturnCode6, SendCode4]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _obj = cls.model_validate({ - "sendCode": UserServiceSendInviteCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) 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..07b31897 100644 --- a/zitadel_client/models/user_service_create_invite_code_response.py +++ b/zitadel_client/models/user_service_create_invite_code_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -72,6 +72,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() + # set to None if invite_code (nullable) is None + # and model_fields_set contains the field + if self.invite_code is None and "invite_code" in self.model_fields_set: + _dict['inviteCode'] = None + return _dict @classmethod 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..652c42b4 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 @@ -13,77 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.return_code4 import ReturnCode4 +from zitadel_client.models.send_link import SendLink +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.user_service_send_passkey_registration_link import UserServiceSendPasskeyRegistrationLink -from typing import Optional, Set -from typing_extensions import Self +USERSERVICECREATEPASSKEYREGISTRATIONLINKREQUEST_ONE_OF_SCHEMAS = ["ReturnCode4", "SendLink"] class UserServiceCreatePasskeyRegistrationLinkRequest(BaseModel): """ UserServiceCreatePasskeyRegistrationLinkRequest - """ # noqa: E501 - send_link: Optional[UserServiceSendPasskeyRegistrationLink] = Field(default=None, alias="sendLink") - return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + """ + # data type: ReturnCode4 + oneof_schema_1_validator: Optional[ReturnCode4] = None + # data type: SendLink + oneof_schema_2_validator: Optional[SendLink] = None + actual_instance: Optional[Union[ReturnCode4, SendLink]] = None + one_of_schemas: Set[str] = { "ReturnCode4", "SendLink" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceCreatePasskeyRegistrationLinkRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: ReturnCode4 + if not isinstance(v, ReturnCode4): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode4`") + else: + match += 1 + # validate data type: SendLink + if not isinstance(v, SendLink): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendLink`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceCreatePasskeyRegistrationLinkRequest with oneOf schemas: ReturnCode4, SendLink. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceCreatePasskeyRegistrationLinkRequest with oneOf schemas: ReturnCode4, SendLink. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceCreatePasskeyRegistrationLinkRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceCreatePasskeyRegistrationLinkRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ReturnCode4 + try: + instance.actual_instance = ReturnCode4.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendLink + try: + instance.actual_instance = SendLink.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceCreatePasskeyRegistrationLinkRequest with oneOf schemas: ReturnCode4, SendLink. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceCreatePasskeyRegistrationLinkRequest with oneOf schemas: ReturnCode4, SendLink. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ReturnCode4, SendLink]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _obj = cls.model_validate({ - "sendLink": UserServiceSendPasskeyRegistrationLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None, - "returnCode": obj.get("returnCode") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) 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..285887a6 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 @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from zitadel_client.models.user_service_passkey_registration_code import UserServicePasskeyRegistrationCode from typing import Optional, Set diff --git a/zitadel_client/models/user_service_deactivate_user_request.py b/zitadel_client/models/user_service_deactivate_user_request.py new file mode 100644 index 00000000..c80f4958 --- /dev/null +++ b/zitadel_client/models/user_service_deactivate_user_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceDeactivateUserRequest(BaseModel): + """ + UserServiceDeactivateUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceDeactivateUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceDeactivateUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..eac55fa9 100644 --- a/zitadel_client/models/user_service_deactivate_user_response.py +++ b/zitadel_client/models/user_service_deactivate_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_delete_user_request.py b/zitadel_client/models/user_service_delete_user_request.py new file mode 100644 index 00000000..65b0d217 --- /dev/null +++ b/zitadel_client/models/user_service_delete_user_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceDeleteUserRequest(BaseModel): + """ + UserServiceDeleteUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceDeleteUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceDeleteUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..a0010877 100644 --- a/zitadel_client/models/user_service_delete_user_response.py +++ b/zitadel_client/models/user_service_delete_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_details.py b/zitadel_client/models/user_service_details.py index d72de17f..047cfee1 100644 --- a/zitadel_client/models/user_service_details.py +++ b/zitadel_client/models/user_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,10 @@ class UserServiceDetails(BaseModel): """ UserServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - 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") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") model_config = ConfigDict( populate_by_name=True, @@ -71,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_display_name_query.py b/zitadel_client/models/user_service_display_name_query.py index 7f86be71..66bd38d9 100644 --- a/zitadel_client/models/user_service_display_name_query.py +++ b/zitadel_client/models/user_service_display_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,8 @@ class UserServiceDisplayNameQuery(BaseModel): """ Query for users with a specific display name. """ # 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 + display_name: StrictStr = Field(alias="displayName") + method: Optional[UserServiceTextQueryMethod] = None model_config = ConfigDict( populate_by_name=True, @@ -83,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "displayName": obj.get("displayName"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_domain_query.py b/zitadel_client/models/user_service_domain_query.py new file mode 100644 index 00000000..f8a33c66 --- /dev/null +++ b/zitadel_client/models/user_service_domain_query.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceDomainQuery(BaseModel): + """ + UserServiceDomainQuery + """ # noqa: E501 + include_without_domain: Optional[StrictBool] = Field(default=None, description="List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI.", alias="includeWithoutDomain") + domain: Optional[StrictStr] = Field(default=None, description="List only auth methods with specific domain.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceDomainQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceDomainQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "includeWithoutDomain": obj.get("includeWithoutDomain"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_email_query.py b/zitadel_client/models/user_service_email_query.py index 19e8f410..8a51e2e0 100644 --- a/zitadel_client/models/user_service_email_query.py +++ b/zitadel_client/models/user_service_email_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,8 @@ class UserServiceEmailQuery(BaseModel): """ Query for users with a specific email. """ # 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 + email_address: StrictStr = Field(alias="emailAddress") + method: Optional[UserServiceTextQueryMethod] = None model_config = ConfigDict( populate_by_name=True, @@ -83,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "emailAddress": obj.get("emailAddress"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) 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..8c84d522 100644 --- a/zitadel_client/models/user_service_first_name_query.py +++ b/zitadel_client/models/user_service_first_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,8 @@ class UserServiceFirstNameQuery(BaseModel): """ Query for users with a specific first name. """ # 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 + first_name: StrictStr = Field(alias="firstName") + method: Optional[UserServiceTextQueryMethod] = None model_config = ConfigDict( populate_by_name=True, @@ -83,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "firstName": obj.get("firstName"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_get_user_by_id_request.py b/zitadel_client/models/user_service_get_user_by_id_request.py new file mode 100644 index 00000000..01825983 --- /dev/null +++ b/zitadel_client/models/user_service_get_user_by_id_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceGetUserByIDRequest(BaseModel): + """ + UserServiceGetUserByIDRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceGetUserByIDRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceGetUserByIDRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..923817dd 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 @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from zitadel_client.models.user_service_user import UserServiceUser from typing import Optional, Set diff --git a/zitadel_client/models/user_service_hashed_password.py b/zitadel_client/models/user_service_hashed_password.py index dceead31..9fc69c99 100644 --- a/zitadel_client/models/user_service_hashed_password.py +++ b/zitadel_client/models/user_service_hashed_password.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ class UserServiceHashedPassword(BaseModel): """ UserServiceHashedPassword """ # 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\"") + hash: StrictStr change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") model_config = ConfigDict( diff --git a/zitadel_client/models/user_service_human_email.py b/zitadel_client/models/user_service_human_email.py index 1ab98c08..d79ce083 100644 --- a/zitadel_client/models/user_service_human_email.py +++ b/zitadel_client/models/user_service_human_email.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ class UserServiceHumanEmail(BaseModel): """ UserServiceHumanEmail """ # noqa: E501 - email: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None + email: Optional[StrictStr] = None is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") model_config = ConfigDict( diff --git a/zitadel_client/models/user_service_human_mfa_init_skipped_request.py b/zitadel_client/models/user_service_human_mfa_init_skipped_request.py new file mode 100644 index 00000000..f2bdadfd --- /dev/null +++ b/zitadel_client/models/user_service_human_mfa_init_skipped_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceHumanMFAInitSkippedRequest(BaseModel): + """ + UserServiceHumanMFAInitSkippedRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceHumanMFAInitSkippedRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceHumanMFAInitSkippedRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..0b6ce195 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 @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_human_phone.py b/zitadel_client/models/user_service_human_phone.py index e17bf8cf..90ca3de9 100644 --- a/zitadel_client/models/user_service_human_phone.py +++ b/zitadel_client/models/user_service_human_phone.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ class UserServiceHumanPhone(BaseModel): """ UserServiceHumanPhone """ # noqa: E501 - phone: Optional[Annotated[str, Field(strict=True, max_length=200)]] = None + phone: Optional[StrictStr] = None is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") model_config = ConfigDict( diff --git a/zitadel_client/models/user_service_human_profile.py b/zitadel_client/models/user_service_human_profile.py index 925f00de..7e0d7552 100644 --- a/zitadel_client/models/user_service_human_profile.py +++ b/zitadel_client/models/user_service_human_profile.py @@ -18,8 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_gender import UserServiceGender from typing import Optional, Set from typing_extensions import Self @@ -28,13 +27,13 @@ class UserServiceHumanProfile(BaseModel): """ UserServiceHumanProfile """ # noqa: E501 - given_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, alias="givenName") - family_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, alias="familyName") - nick_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, alias="nickName") - 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 - avatar_url: Optional[StrictStr] = Field(default=None, description="avatar URL of the user", alias="avatarUrl") + given_name: Optional[StrictStr] = Field(default=None, alias="givenName") + family_name: Optional[StrictStr] = Field(default=None, alias="familyName") + nick_name: Optional[StrictStr] = Field(default=None, alias="nickName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + preferred_language: Optional[StrictStr] = Field(default=None, alias="preferredLanguage") + gender: Optional[UserServiceGender] = None + avatar_url: Optional[StrictStr] = Field(default=None, alias="avatarUrl") model_config = ConfigDict( populate_by_name=True, @@ -75,6 +74,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict['nickName'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if preferred_language (nullable) is None + # and model_fields_set contains the field + if self.preferred_language is None and "preferred_language" in self.model_fields_set: + _dict['preferredLanguage'] = None + return _dict @classmethod @@ -92,7 +106,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "nickName": obj.get("nickName"), "displayName": obj.get("displayName"), "preferredLanguage": obj.get("preferredLanguage"), - "gender": obj.get("gender") if obj.get("gender") is not None else UserServiceGender.GENDER_UNSPECIFIED, + "gender": obj.get("gender"), "avatarUrl": obj.get("avatarUrl") }) return _obj diff --git a/zitadel_client/models/user_service_human_user.py b/zitadel_client/models/user_service_human_user.py index 7493564e..bcde40e7 100644 --- a/zitadel_client/models/user_service_human_user.py +++ b/zitadel_client/models/user_service_human_user.py @@ -32,7 +32,7 @@ class UserServiceHumanUser(BaseModel): UserServiceHumanUser """ # noqa: E501 user_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the user.", alias="userId") - state: Optional[UserServiceUserState] = UserServiceUserState.USER_STATE_UNSPECIFIED + state: Optional[UserServiceUserState] = None username: Optional[StrictStr] = Field(default=None, description="Username of the user, which can be globally unique or unique on organization level.") login_names: Optional[List[StrictStr]] = Field(default=None, description="Possible usable login names for the user.", alias="loginNames") preferred_login_name: Optional[StrictStr] = Field(default=None, description="Preferred login name of the user.", alias="preferredLoginName") @@ -40,8 +40,8 @@ class UserServiceHumanUser(BaseModel): email: Optional[UserServiceHumanEmail] = None phone: Optional[UserServiceHumanPhone] = None 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") + password_changed: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="passwordChanged") + mfa_init_skipped: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="mfaInitSkipped") model_config = ConfigDict( populate_by_name=True, @@ -104,7 +104,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "userId": obj.get("userId"), - "state": obj.get("state") if obj.get("state") is not None else UserServiceUserState.USER_STATE_UNSPECIFIED, + "state": obj.get("state"), "username": obj.get("username"), "loginNames": obj.get("loginNames"), "preferredLoginName": obj.get("preferredLoginName"), diff --git a/zitadel_client/models/user_service_idp_information.py b/zitadel_client/models/user_service_idp_information.py index 9eae7d52..774f4650 100644 --- a/zitadel_client/models/user_service_idp_information.py +++ b/zitadel_client/models/user_service_idp_information.py @@ -13,89 +13,139 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.ldap2 import Ldap2 +from zitadel_client.models.oauth1 import Oauth1 +from zitadel_client.models.saml1 import Saml1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.user_service_idpldap_access_information import UserServiceIDPLDAPAccessInformation -from zitadel_client.models.user_service_idpo_auth_access_information import UserServiceIDPOAuthAccessInformation -from zitadel_client.models.user_service_idpsaml_access_information import UserServiceIDPSAMLAccessInformation -from typing import Optional, Set -from typing_extensions import Self +USERSERVICEIDPINFORMATION_ONE_OF_SCHEMAS = ["Ldap2", "Oauth1", "Saml1"] class UserServiceIDPInformation(BaseModel): """ UserServiceIDPInformation - """ # noqa: E501 - oauth: Optional[UserServiceIDPOAuthAccessInformation] = None - ldap: Optional[UserServiceIDPLDAPAccessInformation] = None - saml: Optional[UserServiceIDPSAMLAccessInformation] = None - idp_id: Optional[StrictStr] = Field(default=None, description="ID of the identity provider", alias="idpId") - 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") + """ + # data type: Ldap2 + oneof_schema_1_validator: Optional[Ldap2] = None + # data type: Oauth1 + oneof_schema_2_validator: Optional[Oauth1] = None + # data type: Saml1 + oneof_schema_3_validator: Optional[Saml1] = None + actual_instance: Optional[Union[Ldap2, Oauth1, Saml1]] = None + one_of_schemas: Set[str] = { "Ldap2", "Oauth1", "Saml1" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceIDPInformation.model_construct() + error_messages = [] + match = 0 + # validate data type: Ldap2 + if not isinstance(v, Ldap2): + error_messages.append(f"Error! Input type `{type(v)}` is not `Ldap2`") + else: + match += 1 + # validate data type: Oauth1 + if not isinstance(v, Oauth1): + error_messages.append(f"Error! Input type `{type(v)}` is not `Oauth1`") + else: + match += 1 + # validate data type: Saml1 + if not isinstance(v, Saml1): + error_messages.append(f"Error! Input type `{type(v)}` is not `Saml1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceIDPInformation with oneOf schemas: Ldap2, Oauth1, Saml1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceIDPInformation with oneOf schemas: Ldap2, Oauth1, Saml1. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceIDPInformation from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceIDPInformation from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Ldap2 + try: + instance.actual_instance = Ldap2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Oauth1 + try: + instance.actual_instance = Oauth1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Saml1 + try: + instance.actual_instance = Saml1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceIDPInformation with oneOf schemas: Ldap2, Oauth1, Saml1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceIDPInformation with oneOf schemas: Ldap2, Oauth1, Saml1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Ldap2, Oauth1, Saml1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - 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") - }) - return _obj + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/user_service_idp_intent.py b/zitadel_client/models/user_service_idp_intent.py index 399da171..e2a2f724 100644 --- a/zitadel_client/models/user_service_idp_intent.py +++ b/zitadel_client/models/user_service_idp_intent.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +26,9 @@ class UserServiceIDPIntent(BaseModel): """ UserServiceIDPIntent """ # 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", 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") + idp_intent_id: Optional[StrictStr] = Field(default=None, alias="idpIntentId") + idp_intent_token: Optional[StrictStr] = Field(default=None, alias="idpIntentToken") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_idp_link.py b/zitadel_client/models/user_service_idp_link.py index ec8ab841..aeb4de32 100644 --- a/zitadel_client/models/user_service_idp_link.py +++ b/zitadel_client/models/user_service_idp_link.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +26,9 @@ class UserServiceIDPLink(BaseModel): """ UserServiceIDPLink """ # noqa: E501 - 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") + idp_id: Optional[StrictStr] = Field(default=None, alias="idpId") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + user_name: Optional[StrictStr] = Field(default=None, alias="userName") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_idpldap_access_information.py b/zitadel_client/models/user_service_idpldap_access_information.py index 1c938e3c..4ea704bc 100644 --- a/zitadel_client/models/user_service_idpldap_access_information.py +++ b/zitadel_client/models/user_service_idpldap_access_information.py @@ -17,8 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_value import UserServiceValue from typing import Optional, Set from typing_extensions import Self @@ -26,7 +27,7 @@ class UserServiceIDPLDAPAccessInformation(BaseModel): """ UserServiceIDPLDAPAccessInformation """ # noqa: E501 - attributes: Optional[Dict[str, Any]] = None + attributes: Optional[Dict[str, Optional[UserServiceValue]]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.") model_config = ConfigDict( populate_by_name=True, @@ -67,6 +68,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each value in attributes (dict) + _field_dict = {} + if self.attributes: + for _key_attributes in self.attributes: + if self.attributes[_key_attributes]: + _field_dict[_key_attributes] = self.attributes[_key_attributes].to_dict() + _dict['attributes'] = _field_dict return _dict @classmethod @@ -79,7 +87,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "attributes": obj.get("attributes") + "attributes": dict( + (_k, UserServiceValue.from_dict(_v)) + for _k, _v in obj["attributes"].items() + ) + if obj.get("attributes") is not None + else None }) 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..14fe9f66 100644 --- a/zitadel_client/models/user_service_idpo_auth_access_information.py +++ b/zitadel_client/models/user_service_idpo_auth_access_information.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -68,6 +68,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if id_token (nullable) is None + # and model_fields_set contains the field + if self.id_token is None and "id_token" in self.model_fields_set: + _dict['idToken'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_idpsaml_access_information.py b/zitadel_client/models/user_service_idpsaml_access_information.py index 05faaf8f..699195b0 100644 --- a/zitadel_client/models/user_service_idpsaml_access_information.py +++ b/zitadel_client/models/user_service_idpsaml_access_information.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, Optional, Union from typing import Optional, Set from typing_extensions import Self 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..6cf394a6 100644 --- a/zitadel_client/models/user_service_in_user_emails_query.py +++ b/zitadel_client/models/user_service_in_user_emails_query.py @@ -26,7 +26,7 @@ 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") + user_emails: Optional[List[StrictStr]] = Field(default=None, alias="userEmails") model_config = ConfigDict( populate_by_name=True, 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..c1671b11 100644 --- a/zitadel_client/models/user_service_in_user_id_query.py +++ b/zitadel_client/models/user_service_in_user_id_query.py @@ -26,7 +26,7 @@ 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") + user_ids: Optional[List[StrictStr]] = Field(default=None, alias="userIds") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_last_name_query.py b/zitadel_client/models/user_service_last_name_query.py index 132c0d21..dc8fa925 100644 --- a/zitadel_client/models/user_service_last_name_query.py +++ b/zitadel_client/models/user_service_last_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,8 @@ class UserServiceLastNameQuery(BaseModel): """ Query for users with a specific last name. """ # 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 + last_name: StrictStr = Field(alias="lastName") + method: Optional[UserServiceTextQueryMethod] = None model_config = ConfigDict( populate_by_name=True, @@ -83,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "lastName": obj.get("lastName"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_ldap_credentials.py b/zitadel_client/models/user_service_ldap_credentials.py index c72633ca..3c1cef6b 100644 --- a/zitadel_client/models/user_service_ldap_credentials.py +++ b/zitadel_client/models/user_service_ldap_credentials.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,8 @@ class UserServiceLDAPCredentials(BaseModel): """ UserServiceLDAPCredentials """ # 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") + username: Optional[StrictStr] = None + password: Optional[StrictStr] = None model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/organization_service_add_organization_request_admin.py b/zitadel_client/models/user_service_list_authentication_factors_request.py similarity index 75% rename from zitadel_client/models/organization_service_add_organization_request_admin.py rename to zitadel_client/models/user_service_list_authentication_factors_request.py index 9bbb0bba..a149b637 100644 --- a/zitadel_client/models/organization_service_add_organization_request_admin.py +++ b/zitadel_client/models/user_service_list_authentication_factors_request.py @@ -19,17 +19,18 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.organization_service_add_human_user_request import OrganizationServiceAddHumanUserRequest +from zitadel_client.models.user_service_auth_factor_state import UserServiceAuthFactorState +from zitadel_client.models.user_service_auth_factors import UserServiceAuthFactors from typing import Optional, Set from typing_extensions import Self -class OrganizationServiceAddOrganizationRequestAdmin(BaseModel): +class UserServiceListAuthenticationFactorsRequest(BaseModel): """ - OrganizationServiceAddOrganizationRequestAdmin + UserServiceListAuthenticationFactorsRequest """ # noqa: E501 - user_id: Optional[StrictStr] = Field(default=None, alias="userId") - human: Optional[OrganizationServiceAddHumanUserRequest] = None - roles: Optional[List[StrictStr]] = None + user_id: StrictStr = Field(alias="userId") + auth_factors: Optional[List[UserServiceAuthFactors]] = Field(default=None, alias="authFactors") + states: Optional[List[UserServiceAuthFactorState]] = None model_config = ConfigDict( populate_by_name=True, @@ -49,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationServiceAddOrganizationRequestAdmin from a JSON string""" + """Create an instance of UserServiceListAuthenticationFactorsRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationServiceAddOrganizationRequestAdmin from a dict""" + """Create an instance of UserServiceListAuthenticationFactorsRequest from a dict""" if obj is None: return None @@ -83,8 +84,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _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") + "authFactors": obj.get("authFactors"), + "states": obj.get("states") }) return _obj diff --git a/zitadel_client/models/user_service_list_authentication_method_types_request.py b/zitadel_client/models/user_service_list_authentication_method_types_request.py new file mode 100644 index 00000000..b1f8a21d --- /dev/null +++ b/zitadel_client/models/user_service_list_authentication_method_types_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_domain_query import UserServiceDomainQuery +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceListAuthenticationMethodTypesRequest(BaseModel): + """ + UserServiceListAuthenticationMethodTypesRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + domain_query: Optional[UserServiceDomainQuery] = Field(default=None, alias="domainQuery") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceListAuthenticationMethodTypesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of domain_query + if self.domain_query: + _dict['domainQuery'] = self.domain_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceListAuthenticationMethodTypesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "domainQuery": UserServiceDomainQuery.from_dict(obj["domainQuery"]) if obj.get("domainQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_list_details.py b/zitadel_client/models/user_service_list_details.py index a84374f9..a92bf935 100644 --- a/zitadel_client/models/user_service_list_details.py +++ b/zitadel_client/models/user_service_list_details.py @@ -18,8 +18,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,9 @@ class UserServiceListDetails(BaseModel): """ UserServiceListDetails """ # noqa: E501 - 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") + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") model_config = ConfigDict( populate_by_name=True, @@ -70,6 +70,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + return _dict @classmethod 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..bf2c5241 100644 --- a/zitadel_client/models/user_service_list_idp_links_request.py +++ b/zitadel_client/models/user_service_list_idp_links_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_list_query import UserServiceListQuery from typing import Optional, Set from typing_extensions import Self @@ -27,6 +27,7 @@ class UserServiceListIDPLinksRequest(BaseModel): """ UserServiceListIDPLinksRequest """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") query: Optional[UserServiceListQuery] = None model_config = ConfigDict( @@ -83,6 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "query": UserServiceListQuery.from_dict(obj["query"]) if obj.get("query") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_list_passkeys_request.py b/zitadel_client/models/user_service_list_passkeys_request.py new file mode 100644 index 00000000..ee93f066 --- /dev/null +++ b/zitadel_client/models/user_service_list_passkeys_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceListPasskeysRequest(BaseModel): + """ + UserServiceListPasskeysRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceListPasskeysRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceListPasskeysRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_list_query.py b/zitadel_client/models/user_service_list_query.py index 70efb20f..0a25d84c 100644 --- a/zitadel_client/models/user_service_list_query.py +++ b/zitadel_client/models/user_service_list_query.py @@ -17,18 +17,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self class UserServiceListQuery(BaseModel): """ - Object unspecific list filters like offset, limit and asc/desc. + UserServiceListQuery """ # noqa: E501 - 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") + offset: Optional[Any] = None + limit: Optional[StrictInt] = None + asc: Optional[StrictBool] = None model_config = ConfigDict( populate_by_name=True, @@ -69,6 +69,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_list_users_request.py b/zitadel_client/models/user_service_list_users_request.py index 163c2436..7c46c1eb 100644 --- a/zitadel_client/models/user_service_list_users_request.py +++ b/zitadel_client/models/user_service_list_users_request.py @@ -30,8 +30,8 @@ class UserServiceListUsersRequest(BaseModel): UserServiceListUsersRequest """ # noqa: E501 query: Optional[UserServiceListQuery] = None - sorting_column: Optional[UserServiceUserFieldName] = Field(default=UserServiceUserFieldName.USER_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") - queries: Optional[List[UserServiceSearchQuery]] = None + sorting_column: Optional[UserServiceUserFieldName] = Field(default=None, alias="sortingColumn") + queries: Optional[List[UserServiceSearchQuery]] = Field(default=None, description="criteria the client is looking for") model_config = ConfigDict( populate_by_name=True, @@ -95,7 +95,7 @@ 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, - "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else UserServiceUserFieldName.USER_FIELD_NAME_UNSPECIFIED, + "sortingColumn": obj.get("sortingColumn"), "queries": [UserServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None }) 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..403b9640 100644 --- a/zitadel_client/models/user_service_list_users_response.py +++ b/zitadel_client/models/user_service_list_users_response.py @@ -30,7 +30,7 @@ class UserServiceListUsersResponse(BaseModel): UserServiceListUsersResponse """ # noqa: E501 details: Optional[UserServiceListDetails] = None - sorting_column: Optional[UserServiceUserFieldName] = Field(default=UserServiceUserFieldName.USER_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") + sorting_column: Optional[UserServiceUserFieldName] = Field(default=None, alias="sortingColumn") result: Optional[List[UserServiceUser]] = None model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, - "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else UserServiceUserFieldName.USER_FIELD_NAME_UNSPECIFIED, + "sortingColumn": obj.get("sortingColumn"), "result": [UserServiceUser.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None }) return _obj diff --git a/zitadel_client/models/settings_service_protobuf_any.py b/zitadel_client/models/user_service_lock_user_request.py similarity index 86% rename from zitadel_client/models/settings_service_protobuf_any.py rename to zitadel_client/models/user_service_lock_user_request.py index 1a5eca25..05db38e5 100644 --- a/zitadel_client/models/settings_service_protobuf_any.py +++ b/zitadel_client/models/user_service_lock_user_request.py @@ -18,15 +18,15 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self -class SettingsServiceProtobufAny(BaseModel): +class UserServiceLockUserRequest(BaseModel): """ - SettingsServiceProtobufAny + UserServiceLockUserRequest """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + user_id: StrictStr = Field(alias="userId") model_config = ConfigDict( populate_by_name=True, @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SettingsServiceProtobufAny from a JSON string""" + """Create an instance of UserServiceLockUserRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SettingsServiceProtobufAny from a dict""" + """Create an instance of UserServiceLockUserRequest from a dict""" if obj is None: return None @@ -79,7 +79,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "userId": obj.get("userId") }) 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..007310c7 100644 --- a/zitadel_client/models/user_service_lock_user_response.py +++ b/zitadel_client/models/user_service_lock_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_login_name_query.py b/zitadel_client/models/user_service_login_name_query.py index a2280e57..eeb59792 100644 --- a/zitadel_client/models/user_service_login_name_query.py +++ b/zitadel_client/models/user_service_login_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,8 @@ class UserServiceLoginNameQuery(BaseModel): """ Query for users with a specific state. """ # 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 + login_name: StrictStr = Field(alias="loginName") + method: Optional[UserServiceTextQueryMethod] = None model_config = ConfigDict( populate_by_name=True, @@ -83,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "loginName": obj.get("loginName"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_machine_user.py b/zitadel_client/models/user_service_machine_user.py index 8fdc9c9a..4d86cfd9 100644 --- a/zitadel_client/models/user_service_machine_user.py +++ b/zitadel_client/models/user_service_machine_user.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_access_token_type import UserServiceAccessTokenType from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class UserServiceMachineUser(BaseModel): name: Optional[StrictStr] = None 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") + access_token_type: Optional[UserServiceAccessTokenType] = Field(default=None, alias="accessTokenType") model_config = ConfigDict( populate_by_name=True, @@ -86,7 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "description": obj.get("description"), "hasSecret": obj.get("hasSecret"), - "accessTokenType": obj.get("accessTokenType") if obj.get("accessTokenType") is not None else UserServiceAccessTokenType.ACCESS_TOKEN_TYPE_BEARER + "accessTokenType": obj.get("accessTokenType") }) 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..b0a22934 100644 --- a/zitadel_client/models/user_service_nick_name_query.py +++ b/zitadel_client/models/user_service_nick_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,8 @@ class UserServiceNickNameQuery(BaseModel): """ Query for users with a specific nickname. """ # 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 + nick_name: StrictStr = Field(alias="nickName") + method: Optional[UserServiceTextQueryMethod] = None model_config = ConfigDict( populate_by_name=True, @@ -83,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "nickName": obj.get("nickName"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_not_query.py b/zitadel_client/models/user_service_not_query.py index 8842f113..c6895975 100644 --- a/zitadel_client/models/user_service_not_query.py +++ b/zitadel_client/models/user_service_not_query.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_or_query.py b/zitadel_client/models/user_service_or_query.py index 2c289daf..06608796 100644 --- a/zitadel_client/models/user_service_or_query.py +++ b/zitadel_client/models/user_service_or_query.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,7 @@ 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'") + queries: Optional[List[UserServiceSearchQuery]] = None model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_organization.py b/zitadel_client/models/user_service_organization.py index 65dfd534..40f53ec7 100644 --- a/zitadel_client/models/user_service_organization.py +++ b/zitadel_client/models/user_service_organization.py @@ -13,76 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.org_domain import OrgDomain +from zitadel_client.models.org_id import OrgId +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +USERSERVICEORGANIZATION_ONE_OF_SCHEMAS = ["OrgDomain", "OrgId"] class UserServiceOrganization(BaseModel): """ UserServiceOrganization - """ # noqa: E501 - org_id: Optional[StrictStr] = Field(default=None, alias="orgId") - org_domain: Optional[StrictStr] = Field(default=None, alias="orgDomain") + """ + # data type: OrgDomain + oneof_schema_1_validator: Optional[OrgDomain] = None + # data type: OrgId + oneof_schema_2_validator: Optional[OrgId] = None + actual_instance: Optional[Union[OrgDomain, OrgId]] = None + one_of_schemas: Set[str] = { "OrgDomain", "OrgId" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceOrganization.model_construct() + error_messages = [] + match = 0 + # validate data type: OrgDomain + if not isinstance(v, OrgDomain): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrgDomain`") + else: + match += 1 + # validate data type: OrgId + if not isinstance(v, OrgId): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrgId`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceOrganization with oneOf schemas: OrgDomain, OrgId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceOrganization with oneOf schemas: OrgDomain, OrgId. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceOrganization from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceOrganization from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into OrgDomain + try: + instance.actual_instance = OrgDomain.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OrgId + try: + instance.actual_instance = OrgId.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceOrganization with oneOf schemas: OrgDomain, OrgId. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceOrganization with oneOf schemas: OrgDomain, OrgId. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], OrgDomain, OrgId]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _obj = cls.model_validate({ - "orgId": obj.get("orgId"), - "orgDomain": obj.get("orgDomain") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/user_service_organization_id_query.py b/zitadel_client/models/user_service_organization_id_query.py index a7121a62..2fc8a3d2 100644 --- a/zitadel_client/models/user_service_organization_id_query.py +++ b/zitadel_client/models/user_service_organization_id_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ 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") + organization_id: StrictStr = Field(alias="organizationId") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_passkey.py b/zitadel_client/models/user_service_passkey.py index 6ebab941..4fbb16a6 100644 --- a/zitadel_client/models/user_service_passkey.py +++ b/zitadel_client/models/user_service_passkey.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_auth_factor_state import UserServiceAuthFactorState from typing import Optional, Set from typing_extensions import Self @@ -29,8 +28,8 @@ class UserServicePasskey(BaseModel): UserServicePasskey """ # noqa: E501 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 + state: Optional[UserServiceAuthFactorState] = None + name: Optional[StrictStr] = None model_config = ConfigDict( populate_by_name=True, @@ -84,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), - "state": obj.get("state") if obj.get("state") is not None else UserServiceAuthFactorState.AUTH_FACTOR_STATE_UNSPECIFIED, + "state": obj.get("state"), "name": obj.get("name") }) 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..ed8a9dd3 100644 --- a/zitadel_client/models/user_service_passkey_registration_code.py +++ b/zitadel_client/models/user_service_passkey_registration_code.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,8 @@ class UserServicePasskeyRegistrationCode(BaseModel): """ UserServicePasskeyRegistrationCode """ # 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\"") + id: StrictStr + code: StrictStr model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_password.py b/zitadel_client/models/user_service_password.py index 6ffe00d3..b4cc3a14 100644 --- a/zitadel_client/models/user_service_password.py +++ b/zitadel_client/models/user_service_password.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ class UserServicePassword(BaseModel): """ UserServicePassword """ # noqa: E501 - password: Annotated[str, Field(min_length=1, strict=True, max_length=200)] + password: StrictStr change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") model_config = ConfigDict( diff --git a/zitadel_client/models/user_service_password_reset_request.py b/zitadel_client/models/user_service_password_reset_request.py index 5e1cf6bf..16c33c7d 100644 --- a/zitadel_client/models/user_service_password_reset_request.py +++ b/zitadel_client/models/user_service_password_reset_request.py @@ -13,77 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.return_code5 import ReturnCode5 +from zitadel_client.models.send_link1 import SendLink1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.user_service_send_password_reset_link import UserServiceSendPasswordResetLink -from typing import Optional, Set -from typing_extensions import Self +USERSERVICEPASSWORDRESETREQUEST_ONE_OF_SCHEMAS = ["ReturnCode5", "SendLink1"] class UserServicePasswordResetRequest(BaseModel): """ UserServicePasswordResetRequest - """ # noqa: E501 - send_link: Optional[UserServiceSendPasswordResetLink] = Field(default=None, alias="sendLink") - return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + """ + # data type: ReturnCode5 + oneof_schema_1_validator: Optional[ReturnCode5] = None + # data type: SendLink1 + oneof_schema_2_validator: Optional[SendLink1] = None + actual_instance: Optional[Union[ReturnCode5, SendLink1]] = None + one_of_schemas: Set[str] = { "ReturnCode5", "SendLink1" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServicePasswordResetRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: ReturnCode5 + if not isinstance(v, ReturnCode5): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode5`") + else: + match += 1 + # validate data type: SendLink1 + if not isinstance(v, SendLink1): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendLink1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServicePasswordResetRequest with oneOf schemas: ReturnCode5, SendLink1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServicePasswordResetRequest with oneOf schemas: ReturnCode5, SendLink1. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServicePasswordResetRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServicePasswordResetRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ReturnCode5 + try: + instance.actual_instance = ReturnCode5.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendLink1 + try: + instance.actual_instance = SendLink1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServicePasswordResetRequest with oneOf schemas: ReturnCode5, SendLink1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServicePasswordResetRequest with oneOf schemas: ReturnCode5, SendLink1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ReturnCode5, SendLink1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _obj = cls.model_validate({ - "sendLink": UserServiceSendPasswordResetLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None, - "returnCode": obj.get("returnCode") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/user_service_password_reset_response.py b/zitadel_client/models/user_service_password_reset_response.py index 7c0b5340..89c868ce 100644 --- a/zitadel_client/models/user_service_password_reset_response.py +++ b/zitadel_client/models/user_service_password_reset_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class UserServicePasswordResetResponse(BaseModel): UserServicePasswordResetResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None - verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + verification_code: Optional[StrictStr] = Field(default=None, description="in case the medium was set to return_code, the code will be returned", alias="verificationCode") model_config = ConfigDict( populate_by_name=True, @@ -72,6 +72,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() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_phone_query.py b/zitadel_client/models/user_service_phone_query.py index 5b2befff..eb79ca01 100644 --- a/zitadel_client/models/user_service_phone_query.py +++ b/zitadel_client/models/user_service_phone_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,8 @@ class UserServicePhoneQuery(BaseModel): """ Query for users with a specific phone. """ # 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 + number: StrictStr + method: Optional[UserServiceTextQueryMethod] = None model_config = ConfigDict( populate_by_name=True, @@ -83,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "number": obj.get("number"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_reactivate_user_request.py b/zitadel_client/models/user_service_reactivate_user_request.py new file mode 100644 index 00000000..509eb17c --- /dev/null +++ b/zitadel_client/models/user_service_reactivate_user_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceReactivateUserRequest(BaseModel): + """ + UserServiceReactivateUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceReactivateUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceReactivateUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..319a3e61 100644 --- a/zitadel_client/models/user_service_reactivate_user_response.py +++ b/zitadel_client/models/user_service_reactivate_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_redirect_urls.py b/zitadel_client/models/user_service_redirect_urls.py index 91d8be0f..d9e7d1eb 100644 --- a/zitadel_client/models/user_service_redirect_urls.py +++ b/zitadel_client/models/user_service_redirect_urls.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,8 @@ class UserServiceRedirectURLs(BaseModel): """ UserServiceRedirectURLs """ # 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") + success_url: Optional[StrictStr] = Field(default=None, alias="successUrl") + failure_url: Optional[StrictStr] = Field(default=None, alias="failureUrl") model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_register_passkey_request.py b/zitadel_client/models/user_service_register_passkey_request.py index 31484169..318b06d6 100644 --- a/zitadel_client/models/user_service_register_passkey_request.py +++ b/zitadel_client/models/user_service_register_passkey_request.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_passkey_authenticator import UserServicePasskeyAuthenticator from zitadel_client.models.user_service_passkey_registration_code import UserServicePasskeyRegistrationCode from typing import Optional, Set @@ -28,9 +28,10 @@ class UserServiceRegisterPasskeyRequest(BaseModel): """ UserServiceRegisterPasskeyRequest """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") 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.\"") + authenticator: Optional[UserServicePasskeyAuthenticator] = None + domain: Optional[StrictStr] = None model_config = ConfigDict( populate_by_name=True, @@ -86,8 +87,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "code": UserServicePasskeyRegistrationCode.from_dict(obj["code"]) if obj.get("code") is not None else None, - "authenticator": obj.get("authenticator") if obj.get("authenticator") is not None else UserServicePasskeyAuthenticator.PASSKEY_AUTHENTICATOR_UNSPECIFIED, + "authenticator": obj.get("authenticator"), "domain": obj.get("domain") }) 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..ac767c6e 100644 --- a/zitadel_client/models/user_service_register_passkey_response.py +++ b/zitadel_client/models/user_service_register_passkey_response.py @@ -18,8 +18,9 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails +from zitadel_client.models.user_service_value import UserServiceValue from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,7 @@ class UserServiceRegisterPasskeyResponse(BaseModel): """ # noqa: E501 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") + public_key_credential_creation_options: Optional[Dict[str, Optional[UserServiceValue]]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredentialCreationOptions") model_config = ConfigDict( populate_by_name=True, @@ -73,6 +74,13 @@ 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() + # override the default output from pydantic by calling `to_dict()` of each value in public_key_credential_creation_options (dict) + _field_dict = {} + if self.public_key_credential_creation_options: + for _key_public_key_credential_creation_options in self.public_key_credential_creation_options: + if self.public_key_credential_creation_options[_key_public_key_credential_creation_options]: + _field_dict[_key_public_key_credential_creation_options] = self.public_key_credential_creation_options[_key_public_key_credential_creation_options].to_dict() + _dict['publicKeyCredentialCreationOptions'] = _field_dict return _dict @classmethod @@ -87,7 +95,12 @@ 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, "passkeyId": obj.get("passkeyId"), - "publicKeyCredentialCreationOptions": obj.get("publicKeyCredentialCreationOptions") + "publicKeyCredentialCreationOptions": dict( + (_k, UserServiceValue.from_dict(_v)) + for _k, _v in obj["publicKeyCredentialCreationOptions"].items() + ) + if obj.get("publicKeyCredentialCreationOptions") is not None + else None }) return _obj diff --git a/zitadel_client/models/user_service_register_totp_request.py b/zitadel_client/models/user_service_register_totp_request.py new file mode 100644 index 00000000..4f2d3f3a --- /dev/null +++ b/zitadel_client/models/user_service_register_totp_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRegisterTOTPRequest(BaseModel): + """ + UserServiceRegisterTOTPRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRegisterTOTPRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRegisterTOTPRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..ebd279d1 100644 --- a/zitadel_client/models/user_service_register_totp_response.py +++ b/zitadel_client/models/user_service_register_totp_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self 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..02aa0189 100644 --- a/zitadel_client/models/user_service_register_u2_f_request.py +++ b/zitadel_client/models/user_service_register_u2_f_request.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,8 @@ class UserServiceRegisterU2FRequest(BaseModel): """ UserServiceRegisterU2FRequest """ # noqa: E501 - domain: Optional[StrictStr] = Field(default=None, description="\"Domain on which the user is authenticated.\"") + user_id: StrictStr = Field(alias="userId") + domain: Optional[StrictStr] = None model_config = ConfigDict( populate_by_name=True, @@ -79,6 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "domain": obj.get("domain") }) 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..a138a9a8 100644 --- a/zitadel_client/models/user_service_register_u2_f_response.py +++ b/zitadel_client/models/user_service_register_u2_f_response.py @@ -18,8 +18,9 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails +from zitadel_client.models.user_service_value import UserServiceValue from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,7 @@ class UserServiceRegisterU2FResponse(BaseModel): """ # noqa: E501 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") + public_key_credential_creation_options: Optional[Dict[str, Optional[UserServiceValue]]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredentialCreationOptions") model_config = ConfigDict( populate_by_name=True, @@ -73,6 +74,13 @@ 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() + # override the default output from pydantic by calling `to_dict()` of each value in public_key_credential_creation_options (dict) + _field_dict = {} + if self.public_key_credential_creation_options: + for _key_public_key_credential_creation_options in self.public_key_credential_creation_options: + if self.public_key_credential_creation_options[_key_public_key_credential_creation_options]: + _field_dict[_key_public_key_credential_creation_options] = self.public_key_credential_creation_options[_key_public_key_credential_creation_options].to_dict() + _dict['publicKeyCredentialCreationOptions'] = _field_dict return _dict @classmethod @@ -87,7 +95,12 @@ 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, "u2fId": obj.get("u2fId"), - "publicKeyCredentialCreationOptions": obj.get("publicKeyCredentialCreationOptions") + "publicKeyCredentialCreationOptions": dict( + (_k, UserServiceValue.from_dict(_v)) + for _k, _v in obj["publicKeyCredentialCreationOptions"].items() + ) + if obj.get("publicKeyCredentialCreationOptions") is not None + else None }) return _obj diff --git a/zitadel_client/models/user_service_remove_idp_link_request.py b/zitadel_client/models/user_service_remove_idp_link_request.py new file mode 100644 index 00000000..f5bb3acc --- /dev/null +++ b/zitadel_client/models/user_service_remove_idp_link_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveIDPLinkRequest(BaseModel): + """ + UserServiceRemoveIDPLinkRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + idp_id: StrictStr = Field(alias="idpId") + linked_user_id: StrictStr = Field(alias="linkedUserId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveIDPLinkRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveIDPLinkRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "idpId": obj.get("idpId"), + "linkedUserId": obj.get("linkedUserId") + }) + 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..408a2b05 100644 --- a/zitadel_client/models/user_service_remove_idp_link_response.py +++ b/zitadel_client/models/user_service_remove_idp_link_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_remove_otp_email_request.py b/zitadel_client/models/user_service_remove_otp_email_request.py new file mode 100644 index 00000000..aa0c84b4 --- /dev/null +++ b/zitadel_client/models/user_service_remove_otp_email_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveOTPEmailRequest(BaseModel): + """ + UserServiceRemoveOTPEmailRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveOTPEmailRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveOTPEmailRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..6660a401 100644 --- a/zitadel_client/models/user_service_remove_otp_email_response.py +++ b/zitadel_client/models/user_service_remove_otp_email_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_remove_otpsms_request.py b/zitadel_client/models/user_service_remove_otpsms_request.py new file mode 100644 index 00000000..ac6963a2 --- /dev/null +++ b/zitadel_client/models/user_service_remove_otpsms_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveOTPSMSRequest(BaseModel): + """ + UserServiceRemoveOTPSMSRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveOTPSMSRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveOTPSMSRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..9ba906cf 100644 --- a/zitadel_client/models/user_service_remove_otpsms_response.py +++ b/zitadel_client/models/user_service_remove_otpsms_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_remove_passkey_request.py b/zitadel_client/models/user_service_remove_passkey_request.py new file mode 100644 index 00000000..e23da6f2 --- /dev/null +++ b/zitadel_client/models/user_service_remove_passkey_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemovePasskeyRequest(BaseModel): + """ + UserServiceRemovePasskeyRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + passkey_id: StrictStr = Field(alias="passkeyId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemovePasskeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemovePasskeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "passkeyId": obj.get("passkeyId") + }) + 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..4288d19c 100644 --- a/zitadel_client/models/user_service_remove_passkey_response.py +++ b/zitadel_client/models/user_service_remove_passkey_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_remove_phone_request.py b/zitadel_client/models/user_service_remove_phone_request.py new file mode 100644 index 00000000..543bcd66 --- /dev/null +++ b/zitadel_client/models/user_service_remove_phone_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemovePhoneRequest(BaseModel): + """ + UserServiceRemovePhoneRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemovePhoneRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemovePhoneRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..019dbfab 100644 --- a/zitadel_client/models/user_service_remove_phone_response.py +++ b/zitadel_client/models/user_service_remove_phone_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_remove_totp_request.py b/zitadel_client/models/user_service_remove_totp_request.py new file mode 100644 index 00000000..7e184fd1 --- /dev/null +++ b/zitadel_client/models/user_service_remove_totp_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveTOTPRequest(BaseModel): + """ + UserServiceRemoveTOTPRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveTOTPRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveTOTPRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..8038a0c7 100644 --- a/zitadel_client/models/user_service_remove_totp_response.py +++ b/zitadel_client/models/user_service_remove_totp_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_remove_u2_f_request.py b/zitadel_client/models/user_service_remove_u2_f_request.py new file mode 100644 index 00000000..72be017d --- /dev/null +++ b/zitadel_client/models/user_service_remove_u2_f_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveU2FRequest(BaseModel): + """ + UserServiceRemoveU2FRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + u2f_id: StrictStr = Field(alias="u2fId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveU2FRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveU2FRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "u2fId": obj.get("u2fId") + }) + 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..fb2ad422 100644 --- a/zitadel_client/models/user_service_remove_u2_f_response.py +++ b/zitadel_client/models/user_service_remove_u2_f_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self 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..04c49809 100644 --- a/zitadel_client/models/user_service_resend_email_code_request.py +++ b/zitadel_client/models/user_service_resend_email_code_request.py @@ -13,77 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.return_code2 import ReturnCode2 +from zitadel_client.models.send_code2 import SendCode2 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.user_service_send_email_verification_code import UserServiceSendEmailVerificationCode -from typing import Optional, Set -from typing_extensions import Self +USERSERVICERESENDEMAILCODEREQUEST_ONE_OF_SCHEMAS = ["ReturnCode2", "SendCode2"] class UserServiceResendEmailCodeRequest(BaseModel): """ UserServiceResendEmailCodeRequest - """ # noqa: E501 - send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") - return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + """ + # data type: ReturnCode2 + oneof_schema_1_validator: Optional[ReturnCode2] = None + # data type: SendCode2 + oneof_schema_2_validator: Optional[SendCode2] = None + actual_instance: Optional[Union[ReturnCode2, SendCode2]] = None + one_of_schemas: Set[str] = { "ReturnCode2", "SendCode2" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceResendEmailCodeRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: ReturnCode2 + if not isinstance(v, ReturnCode2): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode2`") + else: + match += 1 + # validate data type: SendCode2 + if not isinstance(v, SendCode2): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode2`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceResendEmailCodeRequest with oneOf schemas: ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceResendEmailCodeRequest with oneOf schemas: ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceResendEmailCodeRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceResendEmailCodeRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ReturnCode2 + try: + instance.actual_instance = ReturnCode2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode2 + try: + instance.actual_instance = SendCode2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceResendEmailCodeRequest with oneOf schemas: ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceResendEmailCodeRequest with oneOf schemas: ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ReturnCode2, SendCode2]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _obj = cls.model_validate({ - "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) 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..ce9e01bd 100644 --- a/zitadel_client/models/user_service_resend_email_code_response.py +++ b/zitadel_client/models/user_service_resend_email_code_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class UserServiceResendEmailCodeResponse(BaseModel): UserServiceResendEmailCodeResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None - verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") model_config = ConfigDict( populate_by_name=True, @@ -72,6 +72,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() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_resend_invite_code_request.py b/zitadel_client/models/user_service_resend_invite_code_request.py new file mode 100644 index 00000000..cd5ad319 --- /dev/null +++ b/zitadel_client/models/user_service_resend_invite_code_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceResendInviteCodeRequest(BaseModel): + """ + UserServiceResendInviteCodeRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceResendInviteCodeRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceResendInviteCodeRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..bcba3312 100644 --- a/zitadel_client/models/user_service_resend_invite_code_response.py +++ b/zitadel_client/models/user_service_resend_invite_code_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self 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..f6620189 100644 --- a/zitadel_client/models/user_service_resend_phone_code_request.py +++ b/zitadel_client/models/user_service_resend_phone_code_request.py @@ -13,76 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.return_code3 import ReturnCode3 +from zitadel_client.models.send_code3 import SendCode3 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +USERSERVICERESENDPHONECODEREQUEST_ONE_OF_SCHEMAS = ["ReturnCode3", "SendCode3"] class UserServiceResendPhoneCodeRequest(BaseModel): """ UserServiceResendPhoneCodeRequest - """ # noqa: E501 - send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") - return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + """ + # data type: ReturnCode3 + oneof_schema_1_validator: Optional[ReturnCode3] = None + # data type: SendCode3 + oneof_schema_2_validator: Optional[SendCode3] = None + actual_instance: Optional[Union[ReturnCode3, SendCode3]] = None + one_of_schemas: Set[str] = { "ReturnCode3", "SendCode3" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceResendPhoneCodeRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: ReturnCode3 + if not isinstance(v, ReturnCode3): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode3`") + else: + match += 1 + # validate data type: SendCode3 + if not isinstance(v, SendCode3): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode3`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceResendPhoneCodeRequest with oneOf schemas: ReturnCode3, SendCode3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceResendPhoneCodeRequest with oneOf schemas: ReturnCode3, SendCode3. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceResendPhoneCodeRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceResendPhoneCodeRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ReturnCode3 + try: + instance.actual_instance = ReturnCode3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode3 + try: + instance.actual_instance = SendCode3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceResendPhoneCodeRequest with oneOf schemas: ReturnCode3, SendCode3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceResendPhoneCodeRequest with oneOf schemas: ReturnCode3, SendCode3. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ReturnCode3, SendCode3]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _obj = cls.model_validate({ - "sendCode": obj.get("sendCode"), - "returnCode": obj.get("returnCode") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) 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..51d1255a 100644 --- a/zitadel_client/models/user_service_resend_phone_code_response.py +++ b/zitadel_client/models/user_service_resend_phone_code_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class UserServiceResendPhoneCodeResponse(BaseModel): UserServiceResendPhoneCodeResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None - verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") model_config = ConfigDict( populate_by_name=True, @@ -72,6 +72,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() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + return _dict @classmethod 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..5ce625be 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 @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,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") + idp_intent_id: Optional[StrictStr] = Field(default=None, alias="idpIntentId") + idp_intent_token: Optional[StrictStr] = Field(default=None, alias="idpIntentToken") model_config = ConfigDict( populate_by_name=True, @@ -80,6 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "idpIntentId": obj.get("idpIntentId"), "idpIntentToken": obj.get("idpIntentToken") }) 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..bf9b2ee9 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 @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_add_human_user_request import UserServiceAddHumanUserRequest from zitadel_client.models.user_service_details import UserServiceDetails from zitadel_client.models.user_service_idp_information import UserServiceIDPInformation @@ -31,7 +31,7 @@ class UserServiceRetrieveIdentityProviderIntentResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None 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") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") add_human_user: Optional[UserServiceAddHumanUserRequest] = Field(default=None, alias="addHumanUser") model_config = ConfigDict( diff --git a/zitadel_client/models/user_service_rpc_status.py b/zitadel_client/models/user_service_rpc_status.py deleted file mode 100644 index 7fde756c..00000000 --- a/zitadel_client/models/user_service_rpc_status.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Zitadel SDK - - The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.user_service_protobuf_any import UserServiceProtobufAny -from typing import Optional, Set -from typing_extensions import Self - -class UserServiceRpcStatus(BaseModel): - """ - UserServiceRpcStatus - """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[UserServiceProtobufAny]] = None - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceRpcStatus from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) - _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceRpcStatus from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [UserServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None - }) - return _obj - - diff --git a/zitadel_client/models/user_service_search_query.py b/zitadel_client/models/user_service_search_query.py index 7a66876b..74b67141 100644 --- a/zitadel_client/models/user_service_search_query.py +++ b/zitadel_client/models/user_service_search_query.py @@ -13,122 +13,323 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.display_name_query import DisplayNameQuery +from zitadel_client.models.email_query import EmailQuery +from zitadel_client.models.first_name_query import FirstNameQuery +from zitadel_client.models.in_user_emails_query import InUserEmailsQuery +from zitadel_client.models.in_user_ids_query import InUserIdsQuery +from zitadel_client.models.last_name_query import LastNameQuery +from zitadel_client.models.login_name_query import LoginNameQuery +from zitadel_client.models.nick_name_query import NickNameQuery +from zitadel_client.models.organization_id_query import OrganizationIdQuery +from zitadel_client.models.phone_query import PhoneQuery +from zitadel_client.models.state_query import StateQuery +from zitadel_client.models.type_query import TypeQuery +from zitadel_client.models.user_name_query import UserNameQuery +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.user_service_display_name_query import UserServiceDisplayNameQuery -from zitadel_client.models.user_service_email_query import UserServiceEmailQuery -from zitadel_client.models.user_service_first_name_query import UserServiceFirstNameQuery -from zitadel_client.models.user_service_in_user_emails_query import UserServiceInUserEmailsQuery -from zitadel_client.models.user_service_in_user_id_query import UserServiceInUserIDQuery -from zitadel_client.models.user_service_last_name_query import UserServiceLastNameQuery -from zitadel_client.models.user_service_login_name_query import UserServiceLoginNameQuery -from zitadel_client.models.user_service_nick_name_query import UserServiceNickNameQuery -from zitadel_client.models.user_service_organization_id_query import UserServiceOrganizationIdQuery -from zitadel_client.models.user_service_phone_query import UserServicePhoneQuery -from zitadel_client.models.user_service_state_query import UserServiceStateQuery -from zitadel_client.models.user_service_type_query import UserServiceTypeQuery -from zitadel_client.models.user_service_user_name_query import UserServiceUserNameQuery -from typing import Optional, Set -from typing_extensions import Self +USERSERVICESEARCHQUERY_ONE_OF_SCHEMAS = ["AndQuery", "DisplayNameQuery", "EmailQuery", "FirstNameQuery", "InUserEmailsQuery", "InUserIdsQuery", "LastNameQuery", "LoginNameQuery", "NickNameQuery", "NotQuery", "OrQuery", "OrganizationIdQuery", "PhoneQuery", "StateQuery", "TypeQuery", "UserNameQuery"] class UserServiceSearchQuery(BaseModel): """ UserServiceSearchQuery - """ # noqa: E501 - user_name_query: Optional[UserServiceUserNameQuery] = Field(default=None, alias="userNameQuery") - first_name_query: Optional[UserServiceFirstNameQuery] = Field(default=None, alias="firstNameQuery") - last_name_query: Optional[UserServiceLastNameQuery] = Field(default=None, alias="lastNameQuery") - nick_name_query: Optional[UserServiceNickNameQuery] = Field(default=None, alias="nickNameQuery") - display_name_query: Optional[UserServiceDisplayNameQuery] = Field(default=None, alias="displayNameQuery") - email_query: Optional[UserServiceEmailQuery] = Field(default=None, alias="emailQuery") - state_query: Optional[UserServiceStateQuery] = Field(default=None, alias="stateQuery") - type_query: Optional[UserServiceTypeQuery] = Field(default=None, alias="typeQuery") - login_name_query: Optional[UserServiceLoginNameQuery] = Field(default=None, alias="loginNameQuery") - in_user_ids_query: Optional[UserServiceInUserIDQuery] = Field(default=None, alias="inUserIdsQuery") - or_query: Optional[UserServiceOrQuery] = Field(default=None, alias="orQuery") - and_query: Optional[UserServiceAndQuery] = Field(default=None, alias="andQuery") - not_query: Optional[UserServiceNotQuery] = Field(default=None, alias="notQuery") - 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") + """ + # data type: AndQuery + oneof_schema_1_validator: Optional[AndQuery] = None + # data type: DisplayNameQuery + oneof_schema_2_validator: Optional[DisplayNameQuery] = None + # data type: EmailQuery + oneof_schema_3_validator: Optional[EmailQuery] = None + # data type: FirstNameQuery + oneof_schema_4_validator: Optional[FirstNameQuery] = None + # data type: InUserEmailsQuery + oneof_schema_5_validator: Optional[InUserEmailsQuery] = None + # data type: InUserIdsQuery + oneof_schema_6_validator: Optional[InUserIdsQuery] = None + # data type: LastNameQuery + oneof_schema_7_validator: Optional[LastNameQuery] = None + # data type: LoginNameQuery + oneof_schema_8_validator: Optional[LoginNameQuery] = None + # data type: NickNameQuery + oneof_schema_9_validator: Optional[NickNameQuery] = None + # data type: NotQuery + oneof_schema_10_validator: Optional[NotQuery] = None + # data type: OrQuery + oneof_schema_11_validator: Optional[OrQuery] = None + # data type: OrganizationIdQuery + oneof_schema_12_validator: Optional[OrganizationIdQuery] = None + # data type: PhoneQuery + oneof_schema_13_validator: Optional[PhoneQuery] = None + # data type: StateQuery + oneof_schema_14_validator: Optional[StateQuery] = None + # data type: TypeQuery + oneof_schema_15_validator: Optional[TypeQuery] = None + # data type: UserNameQuery + oneof_schema_16_validator: Optional[UserNameQuery] = None + actual_instance: Optional[Union[AndQuery, DisplayNameQuery, EmailQuery, FirstNameQuery, InUserEmailsQuery, InUserIdsQuery, LastNameQuery, LoginNameQuery, NickNameQuery, NotQuery, OrQuery, OrganizationIdQuery, PhoneQuery, StateQuery, TypeQuery, UserNameQuery]] = None + one_of_schemas: Set[str] = { "AndQuery", "DisplayNameQuery", "EmailQuery", "FirstNameQuery", "InUserEmailsQuery", "InUserIdsQuery", "LastNameQuery", "LoginNameQuery", "NickNameQuery", "NotQuery", "OrQuery", "OrganizationIdQuery", "PhoneQuery", "StateQuery", "TypeQuery", "UserNameQuery" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceSearchQuery.model_construct() + error_messages = [] + match = 0 + # validate data type: AndQuery + if not isinstance(v, AndQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `AndQuery`") + else: + match += 1 + # validate data type: DisplayNameQuery + if not isinstance(v, DisplayNameQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `DisplayNameQuery`") + else: + match += 1 + # validate data type: EmailQuery + if not isinstance(v, EmailQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `EmailQuery`") + else: + match += 1 + # validate data type: FirstNameQuery + if not isinstance(v, FirstNameQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `FirstNameQuery`") + else: + match += 1 + # validate data type: InUserEmailsQuery + if not isinstance(v, InUserEmailsQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `InUserEmailsQuery`") + else: + match += 1 + # validate data type: InUserIdsQuery + if not isinstance(v, InUserIdsQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `InUserIdsQuery`") + else: + match += 1 + # validate data type: LastNameQuery + if not isinstance(v, LastNameQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `LastNameQuery`") + else: + match += 1 + # validate data type: LoginNameQuery + if not isinstance(v, LoginNameQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `LoginNameQuery`") + else: + match += 1 + # validate data type: NickNameQuery + if not isinstance(v, NickNameQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `NickNameQuery`") + else: + match += 1 + # validate data type: NotQuery + if not isinstance(v, NotQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `NotQuery`") + else: + match += 1 + # validate data type: OrQuery + if not isinstance(v, OrQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrQuery`") + else: + match += 1 + # validate data type: OrganizationIdQuery + if not isinstance(v, OrganizationIdQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrganizationIdQuery`") + else: + match += 1 + # validate data type: PhoneQuery + if not isinstance(v, PhoneQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `PhoneQuery`") + else: + match += 1 + # validate data type: StateQuery + if not isinstance(v, StateQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `StateQuery`") + else: + match += 1 + # validate data type: TypeQuery + if not isinstance(v, TypeQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `TypeQuery`") + else: + match += 1 + # validate data type: UserNameQuery + if not isinstance(v, UserNameQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserNameQuery`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceSearchQuery with oneOf schemas: AndQuery, DisplayNameQuery, EmailQuery, FirstNameQuery, InUserEmailsQuery, InUserIdsQuery, LastNameQuery, LoginNameQuery, NickNameQuery, NotQuery, OrQuery, OrganizationIdQuery, PhoneQuery, StateQuery, TypeQuery, UserNameQuery. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceSearchQuery with oneOf schemas: AndQuery, DisplayNameQuery, EmailQuery, FirstNameQuery, InUserEmailsQuery, InUserIdsQuery, LastNameQuery, LoginNameQuery, NickNameQuery, NotQuery, OrQuery, OrganizationIdQuery, PhoneQuery, StateQuery, TypeQuery, UserNameQuery. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceSearchQuery from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceSearchQuery from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into AndQuery + try: + instance.actual_instance = AndQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DisplayNameQuery + try: + instance.actual_instance = DisplayNameQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into EmailQuery + try: + instance.actual_instance = EmailQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FirstNameQuery + try: + instance.actual_instance = FirstNameQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into InUserEmailsQuery + try: + instance.actual_instance = InUserEmailsQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into InUserIdsQuery + try: + instance.actual_instance = InUserIdsQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LastNameQuery + try: + instance.actual_instance = LastNameQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LoginNameQuery + try: + instance.actual_instance = LoginNameQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into NickNameQuery + try: + instance.actual_instance = NickNameQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into NotQuery + try: + instance.actual_instance = NotQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OrQuery + try: + instance.actual_instance = OrQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OrganizationIdQuery + try: + instance.actual_instance = OrganizationIdQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PhoneQuery + try: + instance.actual_instance = PhoneQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into StateQuery + try: + instance.actual_instance = StateQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TypeQuery + try: + instance.actual_instance = TypeQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserNameQuery + try: + instance.actual_instance = UserNameQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceSearchQuery with oneOf schemas: AndQuery, DisplayNameQuery, EmailQuery, FirstNameQuery, InUserEmailsQuery, InUserIdsQuery, LastNameQuery, LoginNameQuery, NickNameQuery, NotQuery, OrQuery, OrganizationIdQuery, PhoneQuery, StateQuery, TypeQuery, UserNameQuery. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceSearchQuery with oneOf schemas: AndQuery, DisplayNameQuery, EmailQuery, FirstNameQuery, InUserEmailsQuery, InUserIdsQuery, LastNameQuery, LoginNameQuery, NickNameQuery, NotQuery, OrQuery, OrganizationIdQuery, PhoneQuery, StateQuery, TypeQuery, UserNameQuery. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AndQuery, DisplayNameQuery, EmailQuery, FirstNameQuery, InUserEmailsQuery, InUserIdsQuery, LastNameQuery, LoginNameQuery, NickNameQuery, NotQuery, OrQuery, OrganizationIdQuery, PhoneQuery, StateQuery, TypeQuery, UserNameQuery]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - 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 - }) - return _obj - -from zitadel_client.models.user_service_and_query import UserServiceAndQuery -from zitadel_client.models.user_service_not_query import UserServiceNotQuery -from zitadel_client.models.user_service_or_query import UserServiceOrQuery + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + +from zitadel_client.models.and_query import AndQuery +from zitadel_client.models.not_query import NotQuery +from zitadel_client.models.or_query import OrQuery # TODO: Rewrite to not use raise_errors UserServiceSearchQuery.model_rebuild(raise_errors=False) 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..0b2ff7ba 100644 --- a/zitadel_client/models/user_service_send_email_code_request.py +++ b/zitadel_client/models/user_service_send_email_code_request.py @@ -13,77 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.return_code2 import ReturnCode2 +from zitadel_client.models.send_code2 import SendCode2 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.user_service_send_email_verification_code import UserServiceSendEmailVerificationCode -from typing import Optional, Set -from typing_extensions import Self +USERSERVICESENDEMAILCODEREQUEST_ONE_OF_SCHEMAS = ["ReturnCode2", "SendCode2"] class UserServiceSendEmailCodeRequest(BaseModel): """ UserServiceSendEmailCodeRequest - """ # noqa: E501 - send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") - return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + """ + # data type: ReturnCode2 + oneof_schema_1_validator: Optional[ReturnCode2] = None + # data type: SendCode2 + oneof_schema_2_validator: Optional[SendCode2] = None + actual_instance: Optional[Union[ReturnCode2, SendCode2]] = None + one_of_schemas: Set[str] = { "ReturnCode2", "SendCode2" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceSendEmailCodeRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: ReturnCode2 + if not isinstance(v, ReturnCode2): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode2`") + else: + match += 1 + # validate data type: SendCode2 + if not isinstance(v, SendCode2): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode2`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceSendEmailCodeRequest with oneOf schemas: ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceSendEmailCodeRequest with oneOf schemas: ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceSendEmailCodeRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceSendEmailCodeRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ReturnCode2 + try: + instance.actual_instance = ReturnCode2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode2 + try: + instance.actual_instance = SendCode2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceSendEmailCodeRequest with oneOf schemas: ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceSendEmailCodeRequest with oneOf schemas: ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ReturnCode2, SendCode2]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _obj = cls.model_validate({ - "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) 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..01fb2373 100644 --- a/zitadel_client/models/user_service_send_email_code_response.py +++ b/zitadel_client/models/user_service_send_email_code_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class UserServiceSendEmailCodeResponse(BaseModel): UserServiceSendEmailCodeResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None - verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") model_config = ConfigDict( populate_by_name=True, @@ -72,6 +72,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() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + return _dict @classmethod 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..81e25e9e 100644 --- a/zitadel_client/models/user_service_send_email_verification_code.py +++ b/zitadel_client/models/user_service_send_email_verification_code.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ 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") + url_template: Optional[StrictStr] = 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") model_config = ConfigDict( populate_by_name=True, @@ -68,6 +67,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_send_invite_code.py b/zitadel_client/models/user_service_send_invite_code.py index 5a6c571c..8c8292b1 100644 --- a/zitadel_client/models/user_service_send_invite_code.py +++ b/zitadel_client/models/user_service_send_invite_code.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,8 @@ class UserServiceSendInviteCode(BaseModel): """ UserServiceSendInviteCode """ # 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") + url_template: Optional[StrictStr] = 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 and no previous code was created, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") + application_name: Optional[StrictStr] = 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 and no previous code was created, ZITADEL will be used as default.", alias="applicationName") model_config = ConfigDict( populate_by_name=True, @@ -69,6 +68,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + # set to None if application_name (nullable) is None + # and model_fields_set contains the field + if self.application_name is None and "application_name" in self.model_fields_set: + _dict['applicationName'] = None + return _dict @classmethod 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..056c2ad8 100644 --- a/zitadel_client/models/user_service_send_passkey_registration_link.py +++ b/zitadel_client/models/user_service_send_passkey_registration_link.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ 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") + url_template: Optional[StrictStr] = 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") model_config = ConfigDict( populate_by_name=True, @@ -68,6 +67,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + return _dict @classmethod 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..d446f8d6 100644 --- a/zitadel_client/models/user_service_send_password_reset_link.py +++ b/zitadel_client/models/user_service_send_password_reset_link.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_notification_type import UserServiceNotificationType from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,8 @@ class UserServiceSendPasswordResetLink(BaseModel): """ UserServiceSendPasswordResetLink """ # 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") + notification_type: Optional[UserServiceNotificationType] = Field(default=None, alias="notificationType") + url_template: Optional[StrictStr] = 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") model_config = ConfigDict( populate_by_name=True, @@ -70,6 +69,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + return _dict @classmethod @@ -82,7 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "notificationType": obj.get("notificationType") if obj.get("notificationType") is not None else UserServiceNotificationType.NOTIFICATION_TYPE_UNSPECIFIED, + "notificationType": obj.get("notificationType"), "urlTemplate": obj.get("urlTemplate") }) 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..5863a850 100644 --- a/zitadel_client/models/user_service_set_email_request.py +++ b/zitadel_client/models/user_service_set_email_request.py @@ -13,82 +13,139 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.is_verified import IsVerified +from zitadel_client.models.return_code2 import ReturnCode2 +from zitadel_client.models.send_code2 import SendCode2 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.user_service_send_email_verification_code import UserServiceSendEmailVerificationCode -from typing import Optional, Set -from typing_extensions import Self +USERSERVICESETEMAILREQUEST_ONE_OF_SCHEMAS = ["IsVerified", "ReturnCode2", "SendCode2"] class UserServiceSetEmailRequest(BaseModel): """ UserServiceSetEmailRequest - """ # noqa: E501 - email: Annotated[str, Field(min_length=1, strict=True, max_length=200)] - 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") + """ + # data type: IsVerified + oneof_schema_1_validator: Optional[IsVerified] = None + # data type: ReturnCode2 + oneof_schema_2_validator: Optional[ReturnCode2] = None + # data type: SendCode2 + oneof_schema_3_validator: Optional[SendCode2] = None + actual_instance: Optional[Union[IsVerified, ReturnCode2, SendCode2]] = None + one_of_schemas: Set[str] = { "IsVerified", "ReturnCode2", "SendCode2" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceSetEmailRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: IsVerified + if not isinstance(v, IsVerified): + error_messages.append(f"Error! Input type `{type(v)}` is not `IsVerified`") + else: + match += 1 + # validate data type: ReturnCode2 + if not isinstance(v, ReturnCode2): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode2`") + else: + match += 1 + # validate data type: SendCode2 + if not isinstance(v, SendCode2): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode2`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceSetEmailRequest with oneOf schemas: IsVerified, ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceSetEmailRequest with oneOf schemas: IsVerified, ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceSetEmailRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceSetEmailRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IsVerified + try: + instance.actual_instance = IsVerified.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ReturnCode2 + try: + instance.actual_instance = ReturnCode2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode2 + try: + instance.actual_instance = SendCode2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceSetEmailRequest with oneOf schemas: IsVerified, ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceSetEmailRequest with oneOf schemas: IsVerified, ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IsVerified, ReturnCode2, SendCode2]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _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") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/user_service_set_email_response.py b/zitadel_client/models/user_service_set_email_response.py index 5e838779..c80b58d7 100644 --- a/zitadel_client/models/user_service_set_email_response.py +++ b/zitadel_client/models/user_service_set_email_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class UserServiceSetEmailResponse(BaseModel): UserServiceSetEmailResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None - verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") model_config = ConfigDict( populate_by_name=True, @@ -72,6 +72,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() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_set_human_email.py b/zitadel_client/models/user_service_set_human_email.py index b556de16..2eff666c 100644 --- a/zitadel_client/models/user_service_set_human_email.py +++ b/zitadel_client/models/user_service_set_human_email.py @@ -13,82 +13,139 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.is_verified import IsVerified +from zitadel_client.models.return_code2 import ReturnCode2 +from zitadel_client.models.send_code2 import SendCode2 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.user_service_send_email_verification_code import UserServiceSendEmailVerificationCode -from typing import Optional, Set -from typing_extensions import Self +USERSERVICESETHUMANEMAIL_ONE_OF_SCHEMAS = ["IsVerified", "ReturnCode2", "SendCode2"] class UserServiceSetHumanEmail(BaseModel): """ UserServiceSetHumanEmail - """ # noqa: E501 - email: Annotated[str, Field(min_length=1, strict=True, max_length=200)] - 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") + """ + # data type: IsVerified + oneof_schema_1_validator: Optional[IsVerified] = None + # data type: ReturnCode2 + oneof_schema_2_validator: Optional[ReturnCode2] = None + # data type: SendCode2 + oneof_schema_3_validator: Optional[SendCode2] = None + actual_instance: Optional[Union[IsVerified, ReturnCode2, SendCode2]] = None + one_of_schemas: Set[str] = { "IsVerified", "ReturnCode2", "SendCode2" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceSetHumanEmail.model_construct() + error_messages = [] + match = 0 + # validate data type: IsVerified + if not isinstance(v, IsVerified): + error_messages.append(f"Error! Input type `{type(v)}` is not `IsVerified`") + else: + match += 1 + # validate data type: ReturnCode2 + if not isinstance(v, ReturnCode2): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode2`") + else: + match += 1 + # validate data type: SendCode2 + if not isinstance(v, SendCode2): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode2`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceSetHumanEmail from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceSetHumanEmail from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IsVerified + try: + instance.actual_instance = IsVerified.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ReturnCode2 + try: + instance.actual_instance = ReturnCode2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode2 + try: + instance.actual_instance = SendCode2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceSetHumanEmail with oneOf schemas: IsVerified, ReturnCode2, SendCode2. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IsVerified, ReturnCode2, SendCode2]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _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") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/user_service_set_human_phone.py b/zitadel_client/models/user_service_set_human_phone.py index c24484f4..23e84b15 100644 --- a/zitadel_client/models/user_service_set_human_phone.py +++ b/zitadel_client/models/user_service_set_human_phone.py @@ -13,81 +13,139 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.is_verified import IsVerified +from zitadel_client.models.return_code3 import ReturnCode3 +from zitadel_client.models.send_code3 import SendCode3 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self +USERSERVICESETHUMANPHONE_ONE_OF_SCHEMAS = ["IsVerified", "ReturnCode3", "SendCode3"] class UserServiceSetHumanPhone(BaseModel): """ UserServiceSetHumanPhone - """ # noqa: E501 - phone: Optional[Annotated[str, Field(strict=True, max_length=200)]] = None - 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") + """ + # data type: IsVerified + oneof_schema_1_validator: Optional[IsVerified] = None + # data type: ReturnCode3 + oneof_schema_2_validator: Optional[ReturnCode3] = None + # data type: SendCode3 + oneof_schema_3_validator: Optional[SendCode3] = None + actual_instance: Optional[Union[IsVerified, ReturnCode3, SendCode3]] = None + one_of_schemas: Set[str] = { "IsVerified", "ReturnCode3", "SendCode3" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceSetHumanPhone.model_construct() + error_messages = [] + match = 0 + # validate data type: IsVerified + if not isinstance(v, IsVerified): + error_messages.append(f"Error! Input type `{type(v)}` is not `IsVerified`") + else: + match += 1 + # validate data type: ReturnCode3 + if not isinstance(v, ReturnCode3): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode3`") + else: + match += 1 + # validate data type: SendCode3 + if not isinstance(v, SendCode3): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode3`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode3, SendCode3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode3, SendCode3. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceSetHumanPhone from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceSetHumanPhone from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IsVerified + try: + instance.actual_instance = IsVerified.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ReturnCode3 + try: + instance.actual_instance = ReturnCode3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode3 + try: + instance.actual_instance = SendCode3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode3, SendCode3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceSetHumanPhone with oneOf schemas: IsVerified, ReturnCode3, SendCode3. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IsVerified, ReturnCode3, SendCode3]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _obj = cls.model_validate({ - "phone": obj.get("phone"), - "sendCode": obj.get("sendCode"), - "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/user_service_set_human_profile.py b/zitadel_client/models/user_service_set_human_profile.py index 7da0a092..133f0579 100644 --- a/zitadel_client/models/user_service_set_human_profile.py +++ b/zitadel_client/models/user_service_set_human_profile.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_gender import UserServiceGender from typing import Optional, Set from typing_extensions import Self @@ -28,12 +27,12 @@ class UserServiceSetHumanProfile(BaseModel): """ UserServiceSetHumanProfile """ # noqa: E501 - given_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="givenName") - family_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="familyName") - nick_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, alias="nickName") - 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 + given_name: StrictStr = Field(alias="givenName") + family_name: StrictStr = Field(alias="familyName") + nick_name: Optional[StrictStr] = Field(default=None, alias="nickName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + preferred_language: Optional[StrictStr] = Field(default=None, alias="preferredLanguage") + gender: Optional[UserServiceGender] = None model_config = ConfigDict( populate_by_name=True, @@ -74,6 +73,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict['nickName'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if preferred_language (nullable) is None + # and model_fields_set contains the field + if self.preferred_language is None and "preferred_language" in self.model_fields_set: + _dict['preferredLanguage'] = None + return _dict @classmethod @@ -91,7 +105,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "nickName": obj.get("nickName"), "displayName": obj.get("displayName"), "preferredLanguage": obj.get("preferredLanguage"), - "gender": obj.get("gender") if obj.get("gender") is not None else UserServiceGender.GENDER_UNSPECIFIED + "gender": obj.get("gender") }) 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..c3752e79 100644 --- a/zitadel_client/models/user_service_set_metadata_entry.py +++ b/zitadel_client/models/user_service_set_metadata_entry.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Union -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Union from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,8 @@ class UserServiceSetMetadataEntry(BaseModel): """ UserServiceSetMetadataEntry """ # 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.") + key: StrictStr + value: Union[StrictBytes, StrictStr] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_set_password.py b/zitadel_client/models/user_service_set_password.py index 7f88c236..5cc774af 100644 --- a/zitadel_client/models/user_service_set_password.py +++ b/zitadel_client/models/user_service_set_password.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict from zitadel_client.models.user_service_hashed_password import UserServiceHashedPassword from zitadel_client.models.user_service_password import UserServicePassword from typing import Optional, Set @@ -29,10 +28,10 @@ class UserServiceSetPassword(BaseModel): """ UserServiceSetPassword """ # noqa: E501 - password: Optional[UserServicePassword] = None - 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") + hashed_password: UserServiceHashedPassword = Field(alias="hashedPassword") + password: UserServicePassword + current_password: StrictStr = Field(alias="currentPassword") + verification_code: StrictStr = Field(alias="verificationCode") model_config = ConfigDict( populate_by_name=True, @@ -73,6 +72,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of hashed_password + if self.hashed_password: + _dict['hashedPassword'] = self.hashed_password.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() return _dict @classmethod @@ -85,8 +90,8 @@ 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, + "password": UserServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None, "currentPassword": obj.get("currentPassword"), "verificationCode": obj.get("verificationCode") }) diff --git a/zitadel_client/models/user_service_set_password_request.py b/zitadel_client/models/user_service_set_password_request.py index 0c6dc3a4..7fb8102d 100644 --- a/zitadel_client/models/user_service_set_password_request.py +++ b/zitadel_client/models/user_service_set_password_request.py @@ -13,80 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.current_password import CurrentPassword +from zitadel_client.models.verification_code import VerificationCode +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.user_service_password import UserServicePassword -from typing import Optional, Set -from typing_extensions import Self +USERSERVICESETPASSWORDREQUEST_ONE_OF_SCHEMAS = ["CurrentPassword", "VerificationCode"] class UserServiceSetPasswordRequest(BaseModel): """ UserServiceSetPasswordRequest - """ # noqa: E501 - 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") + """ + # data type: CurrentPassword + oneof_schema_1_validator: Optional[CurrentPassword] = None + # data type: VerificationCode + oneof_schema_2_validator: Optional[VerificationCode] = None + actual_instance: Optional[Union[CurrentPassword, VerificationCode]] = None + one_of_schemas: Set[str] = { "CurrentPassword", "VerificationCode" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceSetPasswordRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: CurrentPassword + if not isinstance(v, CurrentPassword): + error_messages.append(f"Error! Input type `{type(v)}` is not `CurrentPassword`") + else: + match += 1 + # validate data type: VerificationCode + if not isinstance(v, VerificationCode): + error_messages.append(f"Error! Input type `{type(v)}` is not `VerificationCode`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceSetPasswordRequest with oneOf schemas: CurrentPassword, VerificationCode. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceSetPasswordRequest with oneOf schemas: CurrentPassword, VerificationCode. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceSetPasswordRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceSetPasswordRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into CurrentPassword + try: + instance.actual_instance = CurrentPassword.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into VerificationCode + try: + instance.actual_instance = VerificationCode.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceSetPasswordRequest with oneOf schemas: CurrentPassword, VerificationCode. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceSetPasswordRequest with oneOf schemas: CurrentPassword, VerificationCode. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CurrentPassword, VerificationCode]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _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") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/user_service_set_password_response.py b/zitadel_client/models/user_service_set_password_response.py index 4399d060..c570b02c 100644 --- a/zitadel_client/models/user_service_set_password_response.py +++ b/zitadel_client/models/user_service_set_password_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_set_phone_request.py b/zitadel_client/models/user_service_set_phone_request.py index c9620f94..30b49ef6 100644 --- a/zitadel_client/models/user_service_set_phone_request.py +++ b/zitadel_client/models/user_service_set_phone_request.py @@ -13,81 +13,139 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.is_verified import IsVerified +from zitadel_client.models.return_code3 import ReturnCode3 +from zitadel_client.models.send_code3 import SendCode3 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self +USERSERVICESETPHONEREQUEST_ONE_OF_SCHEMAS = ["IsVerified", "ReturnCode3", "SendCode3"] class UserServiceSetPhoneRequest(BaseModel): """ UserServiceSetPhoneRequest - """ # noqa: E501 - phone: Annotated[str, Field(min_length=1, strict=True, max_length=200)] - 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") + """ + # data type: IsVerified + oneof_schema_1_validator: Optional[IsVerified] = None + # data type: ReturnCode3 + oneof_schema_2_validator: Optional[ReturnCode3] = None + # data type: SendCode3 + oneof_schema_3_validator: Optional[SendCode3] = None + actual_instance: Optional[Union[IsVerified, ReturnCode3, SendCode3]] = None + one_of_schemas: Set[str] = { "IsVerified", "ReturnCode3", "SendCode3" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceSetPhoneRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: IsVerified + if not isinstance(v, IsVerified): + error_messages.append(f"Error! Input type `{type(v)}` is not `IsVerified`") + else: + match += 1 + # validate data type: ReturnCode3 + if not isinstance(v, ReturnCode3): + error_messages.append(f"Error! Input type `{type(v)}` is not `ReturnCode3`") + else: + match += 1 + # validate data type: SendCode3 + if not isinstance(v, SendCode3): + error_messages.append(f"Error! Input type `{type(v)}` is not `SendCode3`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceSetPhoneRequest with oneOf schemas: IsVerified, ReturnCode3, SendCode3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceSetPhoneRequest with oneOf schemas: IsVerified, ReturnCode3, SendCode3. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceSetPhoneRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceSetPhoneRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into IsVerified + try: + instance.actual_instance = IsVerified.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ReturnCode3 + try: + instance.actual_instance = ReturnCode3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SendCode3 + try: + instance.actual_instance = SendCode3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceSetPhoneRequest with oneOf schemas: IsVerified, ReturnCode3, SendCode3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceSetPhoneRequest with oneOf schemas: IsVerified, ReturnCode3, SendCode3. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], IsVerified, ReturnCode3, SendCode3]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _obj = cls.model_validate({ - "phone": obj.get("phone"), - "sendCode": obj.get("sendCode"), - "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/user_service_set_phone_response.py b/zitadel_client/models/user_service_set_phone_response.py index fb4d58ac..549c62a8 100644 --- a/zitadel_client/models/user_service_set_phone_response.py +++ b/zitadel_client/models/user_service_set_phone_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class UserServiceSetPhoneResponse(BaseModel): UserServiceSetPhoneResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None - verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") model_config = ConfigDict( populate_by_name=True, @@ -72,6 +72,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() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + return _dict @classmethod 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..aa83ff4f 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 @@ -13,81 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.ldap1 import Ldap1 +from zitadel_client.models.urls import Urls +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.user_service_ldap_credentials import UserServiceLDAPCredentials -from zitadel_client.models.user_service_redirect_urls import UserServiceRedirectURLs -from typing import Optional, Set -from typing_extensions import Self +USERSERVICESTARTIDENTITYPROVIDERINTENTREQUEST_ONE_OF_SCHEMAS = ["Ldap1", "Urls"] class UserServiceStartIdentityProviderIntentRequest(BaseModel): """ UserServiceStartIdentityProviderIntentRequest - """ # noqa: E501 - 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 + """ + # data type: Ldap1 + oneof_schema_1_validator: Optional[Ldap1] = None + # data type: Urls + oneof_schema_2_validator: Optional[Urls] = None + actual_instance: Optional[Union[Ldap1, Urls]] = None + one_of_schemas: Set[str] = { "Ldap1", "Urls" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceStartIdentityProviderIntentRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: Ldap1 + if not isinstance(v, Ldap1): + error_messages.append(f"Error! Input type `{type(v)}` is not `Ldap1`") + else: + match += 1 + # validate data type: Urls + if not isinstance(v, Urls): + error_messages.append(f"Error! Input type `{type(v)}` is not `Urls`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceStartIdentityProviderIntentRequest with oneOf schemas: Ldap1, Urls. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceStartIdentityProviderIntentRequest with oneOf schemas: Ldap1, Urls. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceStartIdentityProviderIntentRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceStartIdentityProviderIntentRequest from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Ldap1 + try: + instance.actual_instance = Ldap1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Urls + try: + instance.actual_instance = Urls.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceStartIdentityProviderIntentRequest with oneOf schemas: Ldap1, Urls. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceStartIdentityProviderIntentRequest with oneOf schemas: Ldap1, Urls. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Ldap1, Urls]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _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 - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) 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..9638190a 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 @@ -13,82 +13,139 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.auth_url import AuthUrl +from zitadel_client.models.idp_intent import IdpIntent +from zitadel_client.models.post_form import PostForm +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from zitadel_client.models.user_service_details import UserServiceDetails -from zitadel_client.models.user_service_idp_intent import UserServiceIDPIntent -from typing import Optional, Set -from typing_extensions import Self +USERSERVICESTARTIDENTITYPROVIDERINTENTRESPONSE_ONE_OF_SCHEMAS = ["AuthUrl", "IdpIntent", "PostForm"] class UserServiceStartIdentityProviderIntentResponse(BaseModel): """ UserServiceStartIdentityProviderIntentResponse - """ # noqa: E501 - details: Optional[UserServiceDetails] = None - 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") + """ + # data type: AuthUrl + oneof_schema_1_validator: Optional[AuthUrl] = None + # data type: IdpIntent + oneof_schema_2_validator: Optional[IdpIntent] = None + # data type: PostForm + oneof_schema_3_validator: Optional[PostForm] = None + actual_instance: Optional[Union[AuthUrl, IdpIntent, PostForm]] = None + one_of_schemas: Set[str] = { "AuthUrl", "IdpIntent", "PostForm" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceStartIdentityProviderIntentResponse.model_construct() + error_messages = [] + match = 0 + # validate data type: AuthUrl + if not isinstance(v, AuthUrl): + error_messages.append(f"Error! Input type `{type(v)}` is not `AuthUrl`") + else: + match += 1 + # validate data type: IdpIntent + if not isinstance(v, IdpIntent): + error_messages.append(f"Error! Input type `{type(v)}` is not `IdpIntent`") + else: + match += 1 + # validate data type: PostForm + if not isinstance(v, PostForm): + error_messages.append(f"Error! Input type `{type(v)}` is not `PostForm`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceStartIdentityProviderIntentResponse with oneOf schemas: AuthUrl, IdpIntent, PostForm. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceStartIdentityProviderIntentResponse with oneOf schemas: AuthUrl, IdpIntent, PostForm. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceStartIdentityProviderIntentResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceStartIdentityProviderIntentResponse from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into AuthUrl + try: + instance.actual_instance = AuthUrl.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into IdpIntent + try: + instance.actual_instance = IdpIntent.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PostForm + try: + instance.actual_instance = PostForm.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceStartIdentityProviderIntentResponse with oneOf schemas: AuthUrl, IdpIntent, PostForm. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceStartIdentityProviderIntentResponse with oneOf schemas: AuthUrl, IdpIntent, PostForm. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AuthUrl, IdpIntent, PostForm]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance - _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") - }) - return _obj + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/user_service_state_query.py b/zitadel_client/models/user_service_state_query.py index bee9785f..af369bfa 100644 --- a/zitadel_client/models/user_service_state_query.py +++ b/zitadel_client/models/user_service_state_query.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict from zitadel_client.models.user_service_user_state import UserServiceUserState from typing import Optional, Set from typing_extensions import Self @@ -80,7 +80,7 @@ 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 UserServiceUserState.USER_STATE_UNSPECIFIED + "state": obj.get("state") }) return _obj diff --git a/zitadel_client/models/user_service_type_query.py b/zitadel_client/models/user_service_type_query.py index 822503ef..68c59445 100644 --- a/zitadel_client/models/user_service_type_query.py +++ b/zitadel_client/models/user_service_type_query.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict from zitadel_client.models.user_service_type import UserServiceType from typing import Optional, Set from typing_extensions import Self @@ -80,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else UserServiceType.TYPE_UNSPECIFIED + "type": obj.get("type") }) return _obj diff --git a/zitadel_client/models/user_service_unlock_user_request.py b/zitadel_client/models/user_service_unlock_user_request.py new file mode 100644 index 00000000..28e4afaa --- /dev/null +++ b/zitadel_client/models/user_service_unlock_user_request.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceUnlockUserRequest(BaseModel): + """ + UserServiceUnlockUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceUnlockUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceUnlockUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + 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..76856cd9 100644 --- a/zitadel_client/models/user_service_unlock_user_response.py +++ b/zitadel_client/models/user_service_unlock_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self 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..e6df1ce6 100644 --- a/zitadel_client/models/user_service_update_human_user_request.py +++ b/zitadel_client/models/user_service_update_human_user_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_set_human_email import UserServiceSetHumanEmail from zitadel_client.models.user_service_set_human_phone import UserServiceSetHumanPhone from zitadel_client.models.user_service_set_human_profile import UserServiceSetHumanProfile @@ -31,7 +30,8 @@ class UserServiceUpdateHumanUserRequest(BaseModel): """ UserServiceUpdateHumanUserRequest """ # noqa: E501 - username: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + username: Optional[StrictStr] = None profile: Optional[UserServiceSetHumanProfile] = None email: Optional[UserServiceSetHumanEmail] = None phone: Optional[UserServiceSetHumanPhone] = None @@ -88,6 +88,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() + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + return _dict @classmethod @@ -100,6 +105,7 @@ 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"), "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, 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..e9827175 100644 --- a/zitadel_client/models/user_service_update_human_user_response.py +++ b/zitadel_client/models/user_service_update_human_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -73,6 +73,16 @@ 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() + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_user.py b/zitadel_client/models/user_service_user.py index c48f1712..c87ff7f1 100644 --- a/zitadel_client/models/user_service_user.py +++ b/zitadel_client/models/user_service_user.py @@ -13,92 +13,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from zitadel_client.models.human import Human +from zitadel_client.models.machine import Machine +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.user_service_details import UserServiceDetails -from zitadel_client.models.user_service_human_user import UserServiceHumanUser -from zitadel_client.models.user_service_machine_user import UserServiceMachineUser -from zitadel_client.models.user_service_user_state import UserServiceUserState -from typing import Optional, Set -from typing_extensions import Self +USERSERVICEUSER_ONE_OF_SCHEMAS = ["Human", "Machine"] class UserServiceUser(BaseModel): """ UserServiceUser - """ # noqa: E501 - user_id: Optional[StrictStr] = Field(default=None, alias="userId") - details: Optional[UserServiceDetails] = None - state: Optional[UserServiceUserState] = UserServiceUserState.USER_STATE_UNSPECIFIED - username: Optional[StrictStr] = None - login_names: Optional[List[StrictStr]] = Field(default=None, alias="loginNames") - preferred_login_name: Optional[StrictStr] = Field(default=None, alias="preferredLoginName") - human: Optional[UserServiceHumanUser] = None - machine: Optional[UserServiceMachineUser] = None + """ + # data type: Human + oneof_schema_1_validator: Optional[Human] = None + # data type: Machine + oneof_schema_2_validator: Optional[Machine] = None + actual_instance: Optional[Union[Human, Machine]] = None + one_of_schemas: Set[str] = { "Human", "Machine" } model_config = ConfigDict( - populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserServiceUser.model_construct() + error_messages = [] + match = 0 + # validate data type: Human + if not isinstance(v, Human): + error_messages.append(f"Error! Input type `{type(v)}` is not `Human`") + else: + match += 1 + # validate data type: Machine + if not isinstance(v, Machine): + error_messages.append(f"Error! Input type `{type(v)}` is not `Machine`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceUser with oneOf schemas: Human, Machine. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceUser with oneOf schemas: Human, Machine. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceUser from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceUser from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Human + try: + instance.actual_instance = Human.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Machine + try: + instance.actual_instance = Machine.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceUser with oneOf schemas: Human, Machine. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceUser with oneOf schemas: Human, Machine. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Human, Machine]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - 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 - }) - return _obj + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/zitadel_client/models/user_service_user_name_query.py b/zitadel_client/models/user_service_user_name_query.py index 59f5f161..bbde435f 100644 --- a/zitadel_client/models/user_service_user_name_query.py +++ b/zitadel_client/models/user_service_user_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,8 @@ class UserServiceUserNameQuery(BaseModel): """ Query for users with a specific user name. """ # 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 + user_name: StrictStr = Field(alias="userName") + method: Optional[UserServiceTextQueryMethod] = None model_config = ConfigDict( populate_by_name=True, @@ -83,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "userName": obj.get("userName"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_value.py b/zitadel_client/models/user_service_value.py new file mode 100644 index 00000000..40d61480 --- /dev/null +++ b/zitadel_client/models/user_service_value.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator +from typing import Any, Dict, List, Optional, Union +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +USERSERVICEVALUE_ONE_OF_SCHEMAS = ["Dict[str, object]", "List[str]", "bool", "float", "str"] + +class UserServiceValue(BaseModel): + """ + `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value. + """ + # data type: float + oneof_schema_1_validator: Optional[Union[StrictFloat, StrictInt]] = None + # data type: str + oneof_schema_2_validator: Optional[StrictStr] = None + # data type: bool + oneof_schema_3_validator: Optional[StrictBool] = None + # data type: List[str] + oneof_schema_4_validator: Optional[List[StrictStr]] = None + # data type: Dict[str, object] + oneof_schema_5_validator: Optional[Dict[str, Any]] = None + actual_instance: Optional[Union[Dict[str, object], List[str], bool, float, str]] = None + one_of_schemas: Set[str] = { "Dict[str, object]", "List[str]", "bool", "float", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = UserServiceValue.model_construct() + error_messages = [] + match = 0 + # validate data type: float + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: str + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: bool + try: + instance.oneof_schema_3_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: List[str] + try: + instance.oneof_schema_4_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: Dict[str, object] + try: + instance.oneof_schema_5_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: Optional[str]) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into float + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into str + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into bool + try: + # validation + instance.oneof_schema_3_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_3_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[str] + try: + # validation + instance.oneof_schema_4_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_4_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Dict[str, object] + try: + # validation + instance.oneof_schema_5_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_5_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserServiceValue with oneOf schemas: Dict[str, object], List[str], bool, float, str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Dict[str, object], List[str], bool, float, str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/zitadel_client/models/user_service_verify_email_request.py b/zitadel_client/models/user_service_verify_email_request.py index 44e368eb..79e81e8b 100644 --- a/zitadel_client/models/user_service_verify_email_request.py +++ b/zitadel_client/models/user_service_verify_email_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,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") + user_id: StrictStr = Field(alias="userId") + verification_code: StrictStr = Field(alias="verificationCode") model_config = ConfigDict( populate_by_name=True, @@ -80,6 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "verificationCode": obj.get("verificationCode") }) 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..583344b6 100644 --- a/zitadel_client/models/user_service_verify_email_response.py +++ b/zitadel_client/models/user_service_verify_email_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self 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..cd32f197 100644 --- a/zitadel_client/models/user_service_verify_invite_code_request.py +++ b/zitadel_client/models/user_service_verify_invite_code_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,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") + user_id: StrictStr = Field(alias="userId") + verification_code: StrictStr = Field(alias="verificationCode") model_config = ConfigDict( populate_by_name=True, @@ -80,6 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "verificationCode": obj.get("verificationCode") }) 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..de04a684 100644 --- a/zitadel_client/models/user_service_verify_invite_code_response.py +++ b/zitadel_client/models/user_service_verify_invite_code_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self 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..91baad32 100644 --- a/zitadel_client/models/user_service_verify_passkey_registration_request.py +++ b/zitadel_client/models/user_service_verify_passkey_registration_request.py @@ -17,9 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_value import UserServiceValue from typing import Optional, Set from typing_extensions import Self @@ -27,8 +27,10 @@ class UserServiceVerifyPasskeyRegistrationRequest(BaseModel): """ UserServiceVerifyPasskeyRegistrationRequest """ # 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") + user_id: StrictStr = Field(alias="userId") + passkey_id: StrictStr = Field(alias="passkeyId") + public_key_credential: Dict[str, Optional[UserServiceValue]] = Field(description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredential") + passkey_name: StrictStr = Field(alias="passkeyName") model_config = ConfigDict( populate_by_name=True, @@ -69,6 +71,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each value in public_key_credential (dict) + _field_dict = {} + if self.public_key_credential: + for _key_public_key_credential in self.public_key_credential: + if self.public_key_credential[_key_public_key_credential]: + _field_dict[_key_public_key_credential] = self.public_key_credential[_key_public_key_credential].to_dict() + _dict['publicKeyCredential'] = _field_dict return _dict @classmethod @@ -81,7 +90,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "publicKeyCredential": obj.get("publicKeyCredential"), + "userId": obj.get("userId"), + "passkeyId": obj.get("passkeyId"), + "publicKeyCredential": dict( + (_k, UserServiceValue.from_dict(_v)) + for _k, _v in obj["publicKeyCredential"].items() + ) + if obj.get("publicKeyCredential") is not None + else None, "passkeyName": obj.get("passkeyName") }) 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..b011a522 100644 --- a/zitadel_client/models/user_service_verify_passkey_registration_response.py +++ b/zitadel_client/models/user_service_verify_passkey_registration_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_verify_phone_request.py b/zitadel_client/models/user_service_verify_phone_request.py index 3c4a798d..c4285266 100644 --- a/zitadel_client/models/user_service_verify_phone_request.py +++ b/zitadel_client/models/user_service_verify_phone_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,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") + user_id: StrictStr = Field(alias="userId") + verification_code: StrictStr = Field(alias="verificationCode") model_config = ConfigDict( populate_by_name=True, @@ -80,6 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "verificationCode": obj.get("verificationCode") }) 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..92a6ff1f 100644 --- a/zitadel_client/models/user_service_verify_phone_response.py +++ b/zitadel_client/models/user_service_verify_phone_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self 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..37471762 100644 --- a/zitadel_client/models/user_service_verify_totp_registration_request.py +++ b/zitadel_client/models/user_service_verify_totp_registration_request.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,8 @@ class UserServiceVerifyTOTPRegistrationRequest(BaseModel): """ UserServiceVerifyTOTPRegistrationRequest """ # noqa: E501 - code: StrictStr = Field(description="Code generated by TOTP app or device") + user_id: StrictStr = Field(alias="userId") + code: StrictStr model_config = ConfigDict( populate_by_name=True, @@ -79,6 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "code": obj.get("code") }) 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..f54b1916 100644 --- a/zitadel_client/models/user_service_verify_totp_registration_response.py +++ b/zitadel_client/models/user_service_verify_totp_registration_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self 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..bf8d9da6 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 @@ -17,9 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_value import UserServiceValue from typing import Optional, Set from typing_extensions import Self @@ -27,8 +27,10 @@ class UserServiceVerifyU2FRegistrationRequest(BaseModel): """ UserServiceVerifyU2FRegistrationRequest """ # 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") + user_id: StrictStr = Field(alias="userId") + u2f_id: StrictStr = Field(alias="u2fId") + public_key_credential: Dict[str, Optional[UserServiceValue]] = Field(description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredential") + token_name: StrictStr = Field(alias="tokenName") model_config = ConfigDict( populate_by_name=True, @@ -69,6 +71,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each value in public_key_credential (dict) + _field_dict = {} + if self.public_key_credential: + for _key_public_key_credential in self.public_key_credential: + if self.public_key_credential[_key_public_key_credential]: + _field_dict[_key_public_key_credential] = self.public_key_credential[_key_public_key_credential].to_dict() + _dict['publicKeyCredential'] = _field_dict return _dict @classmethod @@ -81,7 +90,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "publicKeyCredential": obj.get("publicKeyCredential"), + "userId": obj.get("userId"), + "u2fId": obj.get("u2fId"), + "publicKeyCredential": dict( + (_k, UserServiceValue.from_dict(_v)) + for _k, _v in obj["publicKeyCredential"].items() + ) + if obj.get("publicKeyCredential") is not None + else None, "tokenName": obj.get("tokenName") }) 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..95ba313f 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 @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self diff --git a/zitadel_client/models/user_service_protobuf_any.py b/zitadel_client/models/verification_code.py similarity index 85% rename from zitadel_client/models/user_service_protobuf_any.py rename to zitadel_client/models/verification_code.py index 31027872..b2915ea3 100644 --- a/zitadel_client/models/user_service_protobuf_any.py +++ b/zitadel_client/models/verification_code.py @@ -18,15 +18,15 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class UserServiceProtobufAny(BaseModel): +class VerificationCode(BaseModel): """ - UserServiceProtobufAny + VerificationCode """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + verification_code: StrictStr = Field(alias="verificationCode") model_config = ConfigDict( populate_by_name=True, @@ -46,7 +46,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceProtobufAny from a JSON string""" + """Create an instance of VerificationCode from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceProtobufAny from a dict""" + """Create an instance of VerificationCode from a dict""" if obj is None: return None @@ -79,7 +79,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "verificationCode": obj.get("verificationCode") }) 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 deleted file mode 100644 index 584e3a84..00000000 --- a/zitadel_client/models/web_key_service_beta_web_key.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Zitadel SDK - - The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.web_key_service_beta_ecdsa import WebKeyServiceBetaECDSA -from zitadel_client.models.web_key_service_beta_rsa import WebKeyServiceBetaRSA -from zitadel_client.models.web_key_service_beta_state import WebKeyServiceBetaState -from typing import Optional, Set -from typing_extensions import Self - -class WebKeyServiceBetaWebKey(BaseModel): - """ - WebKeyServiceBetaWebKey - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the key.") - creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the key creation.", alias="creationDate") - change_date: Optional[datetime] = Field(default=None, description="The timestamp of the last change to the key (e.g. creation, activation, deactivation).", alias="changeDate") - state: Optional[WebKeyServiceBetaState] = WebKeyServiceBetaState.STATE_UNSPECIFIED - rsa: Optional[WebKeyServiceBetaRSA] = None - ecdsa: Optional[WebKeyServiceBetaECDSA] = None - ed25519: Optional[Dict[str, Any]] = None - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaWebKey from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaWebKey from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "creationDate": obj.get("creationDate"), - "changeDate": obj.get("changeDate"), - "state": obj.get("state") if obj.get("state") is not None else WebKeyServiceBetaState.STATE_UNSPECIFIED, - "rsa": WebKeyServiceBetaRSA.from_dict(obj["rsa"]) if obj.get("rsa") is not None else None, - "ecdsa": WebKeyServiceBetaECDSA.from_dict(obj["ecdsa"]) if obj.get("ecdsa") is not None else None, - "ed25519": obj.get("ed25519") - }) - return _obj - - From 7a53b97818c28249bec8c14f7a486c7d2ae7943a Mon Sep 17 00:00:00 2001 From: Mridang Agarwalla Date: Wed, 4 Jun 2025 13:02:13 +0300 Subject: [PATCH 2/3] Fixed the project to ensure that it works with the ConnectRPC changes --- spec/auth/using_access_token_spec.py | 4 +-- spec/auth/using_client_credentials_spec.py | 4 +-- spec/auth/using_private_key_spec.py | 4 +-- spec/check_session_service_spec.py | 33 +++++++++------------- spec/check_user_service_spec.py | 25 ++++++++++------ zitadel_client/zitadel.py | 6 ++-- 6 files changed, 39 insertions(+), 37 deletions(-) diff --git a/spec/auth/using_access_token_spec.py b/spec/auth/using_access_token_spec.py index 7aaef13b..ead6c918 100644 --- a/spec/auth/using_access_token_spec.py +++ b/spec/auth/using_access_token_spec.py @@ -47,7 +47,7 @@ def test_retrieves_general_settings_with_valid_token( base_url, auth_token, ) - client.settings.settings_service_get_general_settings() + client.settings.get_general_settings(body={}) def test_raises_api_exception_with_invalid_token( self, @@ -59,4 +59,4 @@ def test_raises_api_exception_with_invalid_token( "invalid", ) with pytest.raises(ZitadelError): - client.settings.settings_service_get_general_settings() + client.settings.get_general_settings(body={}) diff --git a/spec/auth/using_client_credentials_spec.py b/spec/auth/using_client_credentials_spec.py index bc430640..9e5b47a6 100644 --- a/spec/auth/using_client_credentials_spec.py +++ b/spec/auth/using_client_credentials_spec.py @@ -58,7 +58,7 @@ def test_retrieves_general_settings_with_valid_client_credentials( client_id, client_secret, ) - client.settings.settings_service_get_general_settings() + client.settings.get_general_settings(body={}) def test_raises_api_exception_with_invalid_client_credentials( self, @@ -71,4 +71,4 @@ def test_raises_api_exception_with_invalid_client_credentials( "invalid", ) with pytest.raises(ZitadelError): - client.settings.settings_service_get_general_settings() + client.settings.get_general_settings(body={}) diff --git a/spec/auth/using_private_key_spec.py b/spec/auth/using_private_key_spec.py index 76446a82..30844553 100644 --- a/spec/auth/using_private_key_spec.py +++ b/spec/auth/using_private_key_spec.py @@ -47,7 +47,7 @@ def test_retrieves_general_settings_with_valid_private_key( base_url, key_file, ) - client.settings.settings_service_get_general_settings() + client.settings.get_general_settings(body={}) def test_raises_api_exception_with_invalid_private_key( self, @@ -59,4 +59,4 @@ def test_raises_api_exception_with_invalid_private_key( key_file, ) with pytest.raises(ZitadelError): - client.settings.settings_service_get_general_settings() + client.settings.get_general_settings(body={}) diff --git a/spec/check_session_service_spec.py b/spec/check_session_service_spec.py index e1ebecc3..183c47c3 100644 --- a/spec/check_session_service_spec.py +++ b/spec/check_session_service_spec.py @@ -12,11 +12,10 @@ SessionServiceCreateSessionRequest, SessionServiceCreateSessionResponse, SessionServiceDeleteSessionRequest, + SessionServiceGetSessionRequest, SessionServiceGetSessionResponse, SessionServiceListSessionsRequest, - SessionServiceListSessionsResponse, SessionServiceSetSessionRequest, - SessionServiceSetSessionResponse, ) @@ -52,15 +51,12 @@ def session(client: zitadel.Zitadel) -> Generator[SessionServiceCreateSessionRes checks=SessionServiceChecks(user=SessionServiceCheckUser(loginName="johndoe")), lifetime="18000s", ) - response = client.sessions.session_service_create_session(request) + response = client.sessions.create_session(request) yield response # Teardown - delete_body = SessionServiceDeleteSessionRequest() try: - client.sessions.session_service_delete_session( - response.session_id if response.session_id is not None else "", - delete_body, - ) + request2 = SessionServiceDeleteSessionRequest(sessionId=response.session_id if response.session_id is not None else "") + client.sessions.delete_session(request2) except ApiError: pass @@ -88,9 +84,8 @@ def test_retrieves_session_details_by_id( session: SessionServiceCreateSessionResponse, ) -> None: """Retrieves the session details by ID.""" - response: SessionServiceGetSessionResponse = client.sessions.session_service_get_session( - session.session_id if session.session_id is not None else "" - ) + request = SessionServiceGetSessionRequest(sessionId=session.session_id if session.session_id is not None else "") + response: SessionServiceGetSessionResponse = client.sessions.get_session(request) assert response.session is not None assert response.session.id == session.session_id @@ -101,7 +96,7 @@ def test_includes_created_session_when_listing( ) -> None: """Includes the created session when listing all sessions.""" request = SessionServiceListSessionsRequest(queries=[]) - response: SessionServiceListSessionsResponse = client.sessions.session_service_list_sessions(request) + response = client.sessions.list_sessions(request) assert response.sessions is not None assert session.session_id in [session.id for session in response.sessions] @@ -111,11 +106,10 @@ def test_updates_session_lifetime_and_returns_new_token( session: SessionServiceCreateSessionResponse, ) -> None: """Updates the session lifetime and returns a new token.""" - request = SessionServiceSetSessionRequest(lifetime="36000s") - response: SessionServiceSetSessionResponse = client.sessions.session_service_set_session( - session.session_id if session.session_id is not None else "", - request, + request = SessionServiceSetSessionRequest( + sessionId=session.session_id if session.session_id is not None else "", lifetime="36000s" ) + response = client.sessions.set_session(request) assert isinstance(response.session_token, str) def test_raises_api_exception_for_nonexistent_session( @@ -125,7 +119,8 @@ def test_raises_api_exception_for_nonexistent_session( ) -> None: """Raises an ApiException when retrieving a non-existent session.""" with pytest.raises(ApiError): - client.sessions.session_service_get_session( - str(uuid.uuid4()), - session_token=session.session_token, + request = SessionServiceGetSessionRequest( + sessionId=str(uuid.uuid4()), + sessionToken=session.session_token, ) + client.sessions.get_session(request) diff --git a/spec/check_user_service_spec.py b/spec/check_user_service_spec.py index 847b934f..cbc11e44 100644 --- a/spec/check_user_service_spec.py +++ b/spec/check_user_service_spec.py @@ -5,6 +5,7 @@ import pytest import zitadel_client as zitadel +from zitadel_client import UserServiceGetUserByIDRequest from zitadel_client.exceptions import ApiError from zitadel_client.models import ( UserServiceAddHumanUserRequest, @@ -50,10 +51,10 @@ def user(client: zitadel.Zitadel) -> Generator[UserServiceAddHumanUserResponse, profile=UserServiceSetHumanProfile(given_name="John", family_name="Doe"), # type: ignore[call-arg] email=UserServiceSetHumanEmail(email=f"johndoe{uuid.uuid4().hex}@example.com"), ) - response = client.users.user_service_add_human_user(request) + response = client.users.add_human_user(request) yield response try: - client.users.user_service_delete_user(response.user_id) # type: ignore[arg-type] + client.users.delete_user(response.user_id) # type: ignore[arg-type] except ApiError: pass @@ -81,7 +82,10 @@ def test_retrieves_user_details_by_id( user: UserServiceAddHumanUserResponse, ) -> None: """Retrieves the user details by ID.""" - response: UserServiceGetUserByIDResponse = client.users.user_service_get_user_by_id(user.user_id) # type: ignore[arg-type] + request = UserServiceGetUserByIDRequest( + userId=user.user_id, # type: ignore[arg-type] + ) + response: UserServiceGetUserByIDResponse = client.users.get_user_by_id(request) assert response.user.user_id == user.user_id # type: ignore[union-attr] def test_includes_created_user_when_listing( @@ -91,7 +95,7 @@ def test_includes_created_user_when_listing( ) -> None: """Includes the created user when listing all users.""" request = UserServiceListUsersRequest(queries=[]) - response = client.users.user_service_list_users(request) + response = client.users.list_users(request) ids = [u.user_id for u in response.result] # type: ignore assert user.user_id in ids @@ -101,11 +105,11 @@ def test_updates_user_email_and_reflects_in_get( user: UserServiceAddHumanUserResponse, ) -> None: """Updates the user's email and verifies the change.""" - client.users.user_service_update_human_user( - user.user_id, # type: ignore[arg-type] - UserServiceUpdateHumanUserRequest(email=UserServiceSetHumanEmail(email=f"updated{uuid.uuid4().hex}@example.com")), + request = UserServiceUpdateHumanUserRequest( + userId=user.user_id, email=UserServiceSetHumanEmail(email=f"updated{uuid.uuid4().hex}@example.com") ) - response = client.users.user_service_get_user_by_id(user.user_id) # type: ignore[arg-type] + client.users.update_human_user(request) + response = client.users.get_user_by_id(user.user_id) # type: ignore[arg-type] assert "updated" in response.user.human.email.email # type: ignore def test_raises_api_exception_for_nonexistent_user( @@ -114,4 +118,7 @@ def test_raises_api_exception_for_nonexistent_user( ) -> None: """Raises an ApiException when retrieving a non-existent user.""" with pytest.raises(ApiError): - client.users.user_service_get_user_by_id(str(uuid.uuid4())) + request = UserServiceGetUserByIDRequest( + userId=str(uuid.uuid4()), + ) + client.users.get_user_by_id(request) diff --git a/zitadel_client/zitadel.py b/zitadel_client/zitadel.py index afb90400..cf5dc442 100644 --- a/zitadel_client/zitadel.py +++ b/zitadel_client/zitadel.py @@ -1,7 +1,7 @@ from types import TracebackType from typing import Callable, Optional, Type, TypeVar -from zitadel_client.api import ActionServiceApi, SAMLServiceApi, WebKeyServiceApi +from zitadel_client.api import BetaActionServiceApi, SAMLServiceApi, BetaWebKeyServiceApi from zitadel_client.api.feature_service_api import FeatureServiceApi from zitadel_client.api.identity_provider_service_api import IdentityProviderServiceApi from zitadel_client.api.oidc_service_api import OIDCServiceApi @@ -63,7 +63,7 @@ def __init__( mutate_config(self.configuration) client = ApiClient(configuration=self.configuration) - self.actions = ActionServiceApi(client) + self.actions = BetaActionServiceApi(client) self.features = FeatureServiceApi(client) self.idps = IdentityProviderServiceApi(client) self.oidc = OIDCServiceApi(client) @@ -73,7 +73,7 @@ def __init__( self.settings = SettingsServiceApi(client) self.users = UserServiceApi(client) self.users = UserServiceApi(client) - self.webkeys = WebKeyServiceApi(client) + self.webkeys = BetaWebKeyServiceApi(client) T = TypeVar("T", bound="Zitadel") From 948f4da713661d6ee5129732fab1f5aa5665434d Mon Sep 17 00:00:00 2001 From: Mridang Agarwalla Date: Wed, 4 Jun 2025 13:04:49 +0300 Subject: [PATCH 3/3] Fixed the project to ensure that it works with the ConnectRPC changes --- zitadel_client/zitadel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zitadel_client/zitadel.py b/zitadel_client/zitadel.py index cf5dc442..9b1fe03f 100644 --- a/zitadel_client/zitadel.py +++ b/zitadel_client/zitadel.py @@ -1,7 +1,7 @@ from types import TracebackType from typing import Callable, Optional, Type, TypeVar -from zitadel_client.api import BetaActionServiceApi, SAMLServiceApi, BetaWebKeyServiceApi +from zitadel_client.api import BetaActionServiceApi, BetaWebKeyServiceApi, SAMLServiceApi from zitadel_client.api.feature_service_api import FeatureServiceApi from zitadel_client.api.identity_provider_service_api import IdentityProviderServiceApi from zitadel_client.api.oidc_service_api import OIDCServiceApi